Mercurial > hg > truffle
comparison src/os_cpu/bsd_x86/vm/bsd_x86_64.ad @ 9063:46d24f112c27
Merge
author | dcubed |
---|---|
date | Fri, 05 Apr 2013 16:16:18 -0700 |
parents | e961c11b85fe |
children |
comparison
equal
deleted
inserted
replaced
9061:4c8bb5e4f68f | 9063:46d24f112c27 |
---|---|
53 // code in the enc_class source block. Emit functions will live in the | 53 // code in the enc_class source block. Emit functions will live in the |
54 // main source block for now. In future, we can generalize this by | 54 // main source block for now. In future, we can generalize this by |
55 // adding a syntax that specifies the sizes of fields in an order, | 55 // adding a syntax that specifies the sizes of fields in an order, |
56 // so that the adlc can build the emit functions automagically | 56 // so that the adlc can build the emit functions automagically |
57 | 57 |
58 enc_class Java_To_Runtime(method meth) %{ | |
59 // No relocation needed | |
60 | |
61 // movq r10, <meth> | |
62 emit_opcode(cbuf, Assembler::REX_WB); | |
63 emit_opcode(cbuf, 0xB8 | (R10_enc - 8)); | |
64 emit_d64(cbuf, (int64_t) $meth$$method); | |
65 | |
66 // call (r10) | |
67 emit_opcode(cbuf, Assembler::REX_B); | |
68 emit_opcode(cbuf, 0xFF); | |
69 emit_opcode(cbuf, 0xD0 | (R10_enc - 8)); | |
70 %} | |
71 | |
72 %} | 58 %} |
73 | 59 |
74 | 60 |
75 // Platform dependent source | 61 // Platform dependent source |
76 | 62 |
77 source %{ | 63 source %{ |
78 | 64 |
79 int MachCallRuntimeNode::ret_addr_offset() { | |
80 return 13; // movq r10,#addr; callq (r10) | |
81 } | |
82 | |
83 %} | 65 %} |