[fpc-devel] String cases development
jonas.maebe at elis.ugent.be
Sat May 2 14:45:33 CEST 2009
On 02 May 2009, at 14:32, Michael V. Denisenko wrote:
> Здравствуйте, Jonas.
> I've got a problem trying to move fpc_shortstr_compare parameters to
> the registers EAX and EDX.
> The command 'getintregister', as I understood, returns some register
> which just satisfies a size-condition.
> How to get a proper register, for example, EDX? Is
> there any special command?
There is paramanager.getintparaloc(), but you should try doing as much
as possible at the node tree level rather than at the assembler level
(especially calls). You can use caddnode.create(equaln,x,y) to create
a comparison node, cstringconstnode.create() to create a string
constant node, etc. The addnode will automatically select the proper
comparison routine (shortstring, ansistring, widestring,
unicodestring, <any future kind of string>) and insert necessary type
More information about the fpc-devel