192 assert(allocates2(pc), "relocation addr must be in this section"); |
190 assert(allocates2(pc), "relocation addr must be in this section"); |
193 _locs_point = pc; |
191 _locs_point = pc; |
194 } |
192 } |
195 |
193 |
196 // Code emission |
194 // Code emission |
197 void emit_int8 (int8_t x) { *((int8_t*) end()) = x; set_end(end() + 1); } |
195 void emit_int8 ( int8_t x) { *((int8_t*) end()) = x; set_end(end() + sizeof(int8_t)); } |
198 void emit_int16(int16_t x) { *((int16_t*) end()) = x; set_end(end() + 2); } |
196 void emit_int16( int16_t x) { *((int16_t*) end()) = x; set_end(end() + sizeof(int16_t)); } |
199 void emit_int32(int32_t x) { *((int32_t*) end()) = x; set_end(end() + 4); } |
197 void emit_int32( int32_t x) { *((int32_t*) end()) = x; set_end(end() + sizeof(int32_t)); } |
200 void emit_int64(int64_t x) { *((int64_t*) end()) = x; set_end(end() + 8); } |
198 void emit_int64( int64_t x) { *((int64_t*) end()) = x; set_end(end() + sizeof(int64_t)); } |
|
199 |
|
200 void emit_float( jfloat x) { *((jfloat*) end()) = x; set_end(end() + sizeof(jfloat)); } |
|
201 void emit_double(jdouble x) { *((jdouble*) end()) = x; set_end(end() + sizeof(jdouble)); } |
|
202 void emit_address(address x) { *((address*) end()) = x; set_end(end() + sizeof(address)); } |
201 |
203 |
202 // Share a scratch buffer for relocinfo. (Hacky; saves a resource allocation.) |
204 // Share a scratch buffer for relocinfo. (Hacky; saves a resource allocation.) |
203 void initialize_shared_locs(relocInfo* buf, int length); |
205 void initialize_shared_locs(relocInfo* buf, int length); |
204 |
206 |
205 // Manage labels and their addresses. |
207 // Manage labels and their addresses. |