Mercurial > hg > truffle
comparison src/share/vm/asm/assembler.inline.hpp @ 7199:cd3d6a6b95d9
8003240: x86: move MacroAssembler into separate file
Reviewed-by: kvn
author | twisti |
---|---|
date | Fri, 30 Nov 2012 15:23:16 -0800 |
parents | 6ab62ad83507 |
children |
comparison
equal
deleted
inserted
replaced
7198:6ab62ad83507 | 7199:cd3d6a6b95d9 |
---|---|
24 | 24 |
25 #ifndef SHARE_VM_ASM_ASSEMBLER_INLINE_HPP | 25 #ifndef SHARE_VM_ASM_ASSEMBLER_INLINE_HPP |
26 #define SHARE_VM_ASM_ASSEMBLER_INLINE_HPP | 26 #define SHARE_VM_ASM_ASSEMBLER_INLINE_HPP |
27 | 27 |
28 #include "asm/assembler.hpp" | 28 #include "asm/assembler.hpp" |
29 #include "asm/codeBuffer.hpp" | |
30 #include "compiler/disassembler.hpp" | |
31 #include "runtime/threadLocalStorage.hpp" | |
32 | 29 |
33 inline address AbstractAssembler::addr_at(int pos) const { | 30 #ifdef TARGET_ARCH_x86 |
34 return code_section()->start() + pos; | 31 # include "assembler_x86.inline.hpp" |
35 } | 32 #endif |
36 | 33 #ifdef TARGET_ARCH_sparc |
37 void AbstractAssembler::emit_int8(int8_t x) { code_section()->emit_int8 (x); } | 34 # include "assembler_sparc.inline.hpp" |
38 void AbstractAssembler::emit_int16(int16_t x) { code_section()->emit_int16(x); } | 35 #endif |
39 void AbstractAssembler::emit_int32(int32_t x) { code_section()->emit_int32(x); } | 36 #ifdef TARGET_ARCH_zero |
40 void AbstractAssembler::emit_int64(int64_t x) { code_section()->emit_int64(x); } | 37 # include "assembler_zero.inline.hpp" |
41 | 38 #endif |
42 void AbstractAssembler::emit_float(jfloat x) { code_section()->emit_float(x); } | 39 #ifdef TARGET_ARCH_arm |
43 void AbstractAssembler::emit_double(jdouble x) { code_section()->emit_double(x); } | 40 # include "assembler_arm.inline.hpp" |
44 void AbstractAssembler::emit_address(address x) { code_section()->emit_address(x); } | 41 #endif |
45 | 42 #ifdef TARGET_ARCH_ppc |
46 inline address AbstractAssembler::inst_mark() const { | 43 # include "assembler_ppc.inline.hpp" |
47 return code_section()->mark(); | 44 #endif |
48 } | |
49 | |
50 inline void AbstractAssembler::set_inst_mark() { | |
51 code_section()->set_mark(); | |
52 } | |
53 | |
54 inline void AbstractAssembler::clear_inst_mark() { | |
55 code_section()->clear_mark(); | |
56 } | |
57 | |
58 | |
59 inline void AbstractAssembler::relocate(RelocationHolder const& rspec, int format) { | |
60 assert(!pd_check_instruction_mark() | |
61 || inst_mark() == NULL || inst_mark() == code_section()->end(), | |
62 "call relocate() between instructions"); | |
63 code_section()->relocate(code_section()->end(), rspec, format); | |
64 } | |
65 | |
66 | |
67 inline CodeBuffer* AbstractAssembler::code() const { | |
68 return code_section()->outer(); | |
69 } | |
70 | |
71 inline int AbstractAssembler::sect() const { | |
72 return code_section()->index(); | |
73 } | |
74 | |
75 inline address AbstractAssembler::pc() const { | |
76 return code_section()->end(); | |
77 } | |
78 | |
79 inline int AbstractAssembler::offset() const { | |
80 return code_section()->size(); | |
81 } | |
82 | |
83 inline int AbstractAssembler::locator() const { | |
84 return CodeBuffer::locator(offset(), sect()); | |
85 } | |
86 | |
87 inline address AbstractAssembler::target(Label& L) { | |
88 return code_section()->target(L, pc()); | |
89 } | |
90 | |
91 inline int Label::loc_pos() const { | |
92 return CodeBuffer::locator_pos(loc()); | |
93 } | |
94 | |
95 inline int Label::loc_sect() const { | |
96 return CodeBuffer::locator_sect(loc()); | |
97 } | |
98 | |
99 inline void Label::bind_loc(int pos, int sect) { | |
100 bind_loc(CodeBuffer::locator(pos, sect)); | |
101 } | |
102 | 45 |
103 #endif // SHARE_VM_ASM_ASSEMBLER_INLINE_HPP | 46 #endif // SHARE_VM_ASM_ASSEMBLER_INLINE_HPP |