Assembler questions

Rémi Forax forax at univ-mlv.fr
Mon Apr 16 05:09:39 PDT 2012


On 04/16/2012 12:24 PM, Nils Eliasson wrote:
> mov 0x78(%r12,%r11,8),%rbp is a load from address [0x78 + r12 + r11 * 
> 0x8] -> rbp,
> They are called displacement, base, index and scale in x86 language.

Ok, thank you.

My main issue now is what r12 contains ?
r12 is not initialized before so I suppose there is a code convention 
somewhere saying what r12 contains,
I will dig in the source :)

Rémi

>>
>> 0x00007f67a46e326c: mov    0x8(%rsi),%r11d    ; implicit exception: 
>> dispatches to 0x00007f67a46e32ea
>>   ;; B2: #    B7 B3 <- B1  Freq: 0.999999
>>
>>   0x00007f67a46e3270: mov    0x78(%r12,%r11,8),%rbp  ;*invokevirtual 
>> getClass
>>                                                 ; - RT::classCheck at 1 
>> (line 102)
>>                                                 ; - 
>> java.lang.invoke.MethodHandle::invokeExact at 3
>>                                                 ; - 
>> java.lang.invoke.MethodHandle::invokeExact at 3
>>                                                 ; - IndyTest::test at 1
>>   0x00007f67a46e3275: mov    $0x7d6bb4228,%r10  ;   {oop(a 
>> 'java/lang/Class' = 'A')}
>>   0x00007f67a46e327f: cmp    %r10,%rbp
>>   0x00007f67a46e3282: jne    0x00007f67a46e32c9  ;*if_acmpne
>>                                                 ; - RT::classCheck at 5 
>> (line 102)
>>                                                 ; - 
>> java.lang.invoke.MethodHandle::invokeExact at 3
>>                                                 ; - 
>> java.lang.invoke.MethodHandle::invokeExact at 3
>>                                                 ; - IndyTest::test at 1
>>   ;; B3: #    B6 B4 <- B2  Freq: 0.999999
>>
>>   0x00007f67a46e3284: mov    0x40(%r12,%r11,8),%r10
>>   0x00007f67a46e3289: mov    $0x77f280d58,%r11  ;   {oop('A')}
>>   0x00007f67a46e3293: cmp    %r11,%r10
>>   0x00007f67a46e3296: jne    0x00007f67a46e32b4  ;*checkcast
>>                                                 ; - 
>> java.lang.invoke.MethodHandle::invokeExact at 1
>>                                                 ; - 
>> java.lang.invoke.MethodHandle::invokeExact at 21
>>                                                 ; - IndyTest::test at 1
>
>
> -- 
> Oracle <http://www.oracle.com>
> Nils Eliasson | Senior Member of Technical Staff
> Oracle Java Platform Group, JVM Engineering
> ORACLE Sweden
>



More information about the hotspot-compiler-dev mailing list