src/cpu/sparc/vm/macroAssembler_sparc.hpp

changeset 5283
46c544b8fbfc
parent 4542
db9981fd3124
child 5290
87a6f2df28e2
equal deleted inserted replaced
5282:ea60d1de6735 5283:46c544b8fbfc
1054 public: 1054 public:
1055 // traps as per trap.h (SPARC ABI?) 1055 // traps as per trap.h (SPARC ABI?)
1056 1056
1057 void breakpoint_trap(); 1057 void breakpoint_trap();
1058 void breakpoint_trap(Condition c, CC cc); 1058 void breakpoint_trap(Condition c, CC cc);
1059 void flush_windows_trap();
1060 void clean_windows_trap();
1061 void get_psr_trap();
1062 void set_psr_trap();
1063
1064 // V8/V9 flush_windows
1065 void flush_windows();
1066 1059
1067 // Support for serializing memory accesses between threads 1060 // Support for serializing memory accesses between threads
1068 void serialize_memory(Register thread, Register tmp1, Register tmp2); 1061 void serialize_memory(Register thread, Register tmp1, Register tmp2);
1069 1062
1070 // Stack frame creation/removal 1063 // Stack frame creation/removal
1071 void enter(); 1064 void enter();
1072 void leave(); 1065 void leave();
1073
1074 // V8/V9 integer multiply
1075 void mult(Register s1, Register s2, Register d);
1076 void mult(Register s1, int simm13a, Register d);
1077
1078 // V8/V9 read and write of condition codes.
1079 void read_ccr(Register d);
1080 void write_ccr(Register s);
1081 1066
1082 // Manipulation of C++ bools 1067 // Manipulation of C++ bools
1083 // These are idioms to flag the need for care with accessing bools but on 1068 // These are idioms to flag the need for care with accessing bools but on
1084 // this platform we assume byte size 1069 // this platform we assume byte size
1085 1070
1159 void ic_call(address entry, bool emit_delay = true); 1144 void ic_call(address entry, bool emit_delay = true);
1160 1145
1161 // if call_VM_base was called with check_exceptions=false, then call 1146 // if call_VM_base was called with check_exceptions=false, then call
1162 // check_and_forward_exception to handle exceptions when it is safe 1147 // check_and_forward_exception to handle exceptions when it is safe
1163 void check_and_forward_exception(Register scratch_reg); 1148 void check_and_forward_exception(Register scratch_reg);
1164
1165 private:
1166 // For V8
1167 void read_ccr_trap(Register ccr_save);
1168 void write_ccr_trap(Register ccr_save1, Register scratch1, Register scratch2);
1169
1170 #ifdef ASSERT
1171 // For V8 debugging. Uses V8 instruction sequence and checks
1172 // result with V9 insturctions rdccr and wrccr.
1173 // Uses Gscatch and Gscatch2
1174 void read_ccr_v8_assert(Register ccr_save);
1175 void write_ccr_v8_assert(Register ccr_save);
1176 #endif // ASSERT
1177
1178 public:
1179 1149
1180 // Write to card table for - register is destroyed afterwards. 1150 // Write to card table for - register is destroyed afterwards.
1181 void card_table_write(jbyte* byte_map_base, Register tmp, Register obj); 1151 void card_table_write(jbyte* byte_map_base, Register tmp, Register obj);
1182 1152
1183 void card_write_barrier_post(Register store_addr, Register new_val, Register tmp); 1153 void card_write_barrier_post(Register store_addr, Register new_val, Register tmp);
1312 1282
1313 void float_cmp( bool is_float, int unordered_result, 1283 void float_cmp( bool is_float, int unordered_result,
1314 FloatRegister Fa, FloatRegister Fb, 1284 FloatRegister Fa, FloatRegister Fb,
1315 Register Rresult); 1285 Register Rresult);
1316 1286
1317 void fneg( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
1318 void fneg( FloatRegisterImpl::Width w, FloatRegister sd ) { Assembler::fneg(w, sd); }
1319 void fmov( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
1320 void fabs( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
1321
1322 void save_all_globals_into_locals(); 1287 void save_all_globals_into_locals();
1323 void restore_globals_from_locals(); 1288 void restore_globals_from_locals();
1324
1325 void casx_under_lock(Register top_ptr_reg, Register top_reg, Register ptr_reg,
1326 address lock_addr=0, bool use_call_vm=false);
1327 void cas_under_lock(Register top_ptr_reg, Register top_reg, Register ptr_reg,
1328 address lock_addr=0, bool use_call_vm=false);
1329 void casn (Register addr_reg, Register cmp_reg, Register set_reg) ;
1330 1289
1331 // These set the icc condition code to equal if the lock succeeded 1290 // These set the icc condition code to equal if the lock succeeded
1332 // and notEqual if it failed and requires a slow case 1291 // and notEqual if it failed and requires a slow case
1333 void compiler_lock_object(Register Roop, Register Rmark, Register Rbox, 1292 void compiler_lock_object(Register Roop, Register Rmark, Register Rbox,
1334 Register Rscratch, 1293 Register Rscratch,

mercurial