public static int dontOptimize;
public static int simple(){
return dontOptimize;
}
And JITed version of that:
0x00007fdc75112aa0: mov %eax,-0x14000(%rsp)
0x00007fdc75112aa7: push %rbp
0x00007fdc75112aa8: sub $0x30,%rsp
*0x00007fdc75112aac*: mov $0x7fdc7443be90,%rax ; {metadata(method
data for {method} {0x00007fdc7443bb30} 'simple' '()I' in 'Main')}
0x00007fdc75112ab6: mov 0xdc(%rax),%esi
0x00007fdc75112abc: add $0x8,%esi
0x00007fdc75112abf: mov %esi,0xdc(%rax)
0x00007fdc75112ac5: mov $0x7fdc7443bb30,%rax ; {metadata({method} {
0x00007fdc7443bb30} 'simple' '()I' in 'Main')}
0x00007fdc75112acf: and $0x1ff8,%esi
0x00007fdc75112ad5: cmp $0x0,%esi
*0x00007fdc75112ad8*: je 0x00007fdc75112af7
0x00007fdc75112ade: mov $0x76d2414f0,%rax ; {oop(a 'java/lang/Class'
= 'Main')}
0x00007fdc75112ae8: mov 0x68(%rax),%eax ;*getstatic dontOptimize
; - Main::simple@0 (line 11)
0x00007fdc75112aeb: add $0x30,%rsp
0x00007fdc75112aef: pop %rbp
0x00007fdc75112af0: test %eax,0x1861060a(%rip) #
0x00007fdc8d723100
; {poll_return}
0x00007fdc75112af6: retq
Though I know understand I cannot understand a such simple code.
Especially, what does lines between 0x00007fdc75112aac-*0x00007fdc75112ad8*
means?
I highlighted it.
--
You received this message because you are subscribed to the Google Groups
"mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.