Mercurial > hg > graal-compiler
diff src/cpu/x86/vm/graalCodeInstaller_x86.hpp @ 13520:fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 06 Jan 2014 17:19:18 -0800 |
parents | fa5180b3c18e |
children | d49f00604347 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/graalCodeInstaller_x86.hpp Mon Jan 06 14:30:23 2014 -0800 +++ b/src/cpu/x86/vm/graalCodeInstaller_x86.hpp Mon Jan 06 17:19:18 2014 -0800 @@ -80,9 +80,20 @@ case 'b': case 's': case 'c': - case 'i': fatal("int-sized values not expected in DataPatch"); break; + + case 'i': { + address operand = Assembler::locate_operand(pc, Assembler::narrow_oop_operand); + Handle obj = Constant::object(constant); + + jobject value = JNIHandles::make_local(obj()); + int oop_index = _oop_recorder->find_index(value); + _instructions->relocate(pc, oop_Relocation::spec(oop_index), Assembler::narrow_oop_operand); + TRACE_graal_3("relocating (narrow oop constant) at %p/%p", pc, operand); + break; + } + case 'f': case 'j': case 'd':