mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8003195: AbstractAssembler should not store code pointers but use the CodeSection directly
Reviewed-by: twisti, kvn
This commit is contained in:
parent
8e00acca17
commit
a533392684
7 changed files with 68 additions and 101 deletions
|
@ -30,8 +30,6 @@
|
|||
#include "code/relocInfo.hpp"
|
||||
|
||||
class CodeComments;
|
||||
class AbstractAssembler;
|
||||
class MacroAssembler;
|
||||
class PhaseCFG;
|
||||
class Compile;
|
||||
class BufferBlob;
|
||||
|
@ -194,10 +192,14 @@ class CodeSection VALUE_OBJ_CLASS_SPEC {
|
|||
}
|
||||
|
||||
// Code emission
|
||||
void emit_int8 (int8_t x) { *((int8_t*) end()) = x; set_end(end() + 1); }
|
||||
void emit_int16(int16_t x) { *((int16_t*) end()) = x; set_end(end() + 2); }
|
||||
void emit_int32(int32_t x) { *((int32_t*) end()) = x; set_end(end() + 4); }
|
||||
void emit_int64(int64_t x) { *((int64_t*) end()) = x; set_end(end() + 8); }
|
||||
void emit_int8 ( int8_t x) { *((int8_t*) end()) = x; set_end(end() + sizeof(int8_t)); }
|
||||
void emit_int16( int16_t x) { *((int16_t*) end()) = x; set_end(end() + sizeof(int16_t)); }
|
||||
void emit_int32( int32_t x) { *((int32_t*) end()) = x; set_end(end() + sizeof(int32_t)); }
|
||||
void emit_int64( int64_t x) { *((int64_t*) end()) = x; set_end(end() + sizeof(int64_t)); }
|
||||
|
||||
void emit_float( jfloat x) { *((jfloat*) end()) = x; set_end(end() + sizeof(jfloat)); }
|
||||
void emit_double(jdouble x) { *((jdouble*) end()) = x; set_end(end() + sizeof(jdouble)); }
|
||||
void emit_address(address x) { *((address*) end()) = x; set_end(end() + sizeof(address)); }
|
||||
|
||||
// Share a scratch buffer for relocinfo. (Hacky; saves a resource allocation.)
|
||||
void initialize_shared_locs(relocInfo* buf, int length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue