Mercurial > hg > truffle
comparison src/share/vm/asm/codeBuffer.hpp @ 7198:6ab62ad83507
8003195: AbstractAssembler should not store code pointers but use the CodeSection directly
Reviewed-by: twisti, kvn
Contributed-by: Bharadwaj Yadavalli <bharadwaj.yadavalli@oracle.com>
author | twisti |
---|---|
date | Fri, 30 Nov 2012 11:44:05 -0800 |
parents | b31471cdc53e |
children | cd3d6a6b95d9 |
comparison
equal
deleted
inserted
replaced
7197:1acccb7c0b01 | 7198:6ab62ad83507 |
---|---|
28 #include "asm/assembler.hpp" | 28 #include "asm/assembler.hpp" |
29 #include "code/oopRecorder.hpp" | 29 #include "code/oopRecorder.hpp" |
30 #include "code/relocInfo.hpp" | 30 #include "code/relocInfo.hpp" |
31 | 31 |
32 class CodeComments; | 32 class CodeComments; |
33 class AbstractAssembler; | |
34 class MacroAssembler; | |
35 class PhaseCFG; | 33 class PhaseCFG; |
36 class Compile; | 34 class Compile; |
37 class BufferBlob; | 35 class BufferBlob; |
38 class CodeBuffer; | 36 class CodeBuffer; |
39 | 37 |
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. |