Question: "backwards" adressing
Ulf Zibis
Ulf.Zibis at gmx.de
Mon Aug 24 07:10:22 PDT 2009
Am 24.08.2009 15:06, Christian Thalinger schrieb:
> Ulf Zibis wrote:
>
>> In case of "forwards", the compiler could create code which increments
>> the index for the 2nd statement in _same CPU register_, whitout
>> remembering the original value of index in a different place.
>>
>
> The compiler generates in either case a load-with-offset instruction and
> the increment happens independently.
>
> -- Christian
>
>
Thanks for clarifying.
... But isn't using the index register faster, than 2 times
load-with-offset ?
forwards:
accumlator = pop // codePoint
index register = pop // dst
index register += pop // index
save highSurrogate(accumulator) (ix++)
save lowSurrogate(accumulator) (ix)
backwards:
accumlator = pop // codePoint
index register = pop // dst
index register += pop // index
push index register // dst + index
save lowSurrogate(accumulator) (++ix)
index register = pop // dst + index
save highSurrogate(accumulator) (ix)
-Ulf
More information about the hotspot-compiler-dev
mailing list