src/cpu/sparc/vm/interpreter_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7063628 Sdiff src/cpu/sparc/vm

src/cpu/sparc/vm/interpreter_sparc.cpp

Print this page




 174     __ andcc(G4_scratch, sig_mask, G3_scratch);
 175     __ br(Assembler::zero, false, Assembler::pt, NonFloatArg);
 176     __ delayed()->nop();
 177 
 178     __ cmp(G3_scratch, float_sig );
 179     __ br(Assembler::equal, false, Assembler::pt, LoadFloatArg);
 180     __ delayed()->nop();
 181 
 182     __ cmp(G3_scratch, double_sig );
 183     __ br(Assembler::equal, false, Assembler::pt, LoadDoubleArg);
 184     __ delayed()->nop();
 185 
 186     __ bind(NonFloatArg);
 187     // There are only 6 integer register arguments!
 188     if ( ldarg.is_register() )
 189       __ ld_ptr(ldarg.address_in_frame(), ldarg.as_register());
 190     else {
 191     // Optimization, see if there are any more args and get out prior to checking
 192     // all 16 float registers.  My guess is that this is rare.
 193     // If is_register is false, then we are done the first six integer args.
 194       __ tst(G4_scratch);
 195       __ brx(Assembler::zero, false, Assembler::pt, done);
 196       __ delayed()->nop();
 197 
 198     }
 199     __ ba(false, NextArg);
 200     __ delayed()->srl( G4_scratch, 2, G4_scratch );
 201 
 202     __ bind(LoadFloatArg);
 203     __ ldf( FloatRegisterImpl::S, a, ldarg.as_float_register(), 4);
 204     __ ba(false, NextArg);
 205     __ delayed()->srl( G4_scratch, 2, G4_scratch );
 206 
 207     __ bind(LoadDoubleArg);
 208     __ ldf( FloatRegisterImpl::D, a, ldarg.as_double_register() );
 209     __ ba(false, NextArg);
 210     __ delayed()->srl( G4_scratch, 2, G4_scratch );
 211 
 212     __ bind(NextArg);
 213 
 214   }
 215 
 216   __ bind(done);
 217   __ ret();
 218   __ delayed()->
 219      restore(O0, 0, Lscratch);  // caller's Lscratch gets the result handler
 220   return entry;
 221 }
 222 #endif
 223 
 224 void InterpreterGenerator::generate_counter_overflow(Label& Lcontinue) {
 225 
 226   // Generate code to initiate compilation on the counter overflow.
 227 
 228   // InterpreterRuntime::frequency_counter_overflow takes two arguments,
 229   // the first indicates if the counter overflow occurs at a backwards branch (NULL bcp)
 230   // and the second is only used when the first is true.  We pass zero for both.
 231   // The call returns the address of the verified entry point for the method or NULL
 232   // if the compilation did not complete (either went background or bailed out).
 233   __ set((int)false, O2);
 234   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), O2, O2, true);
 235   // returns verified_entry_point or NULL
 236   // we ignore it in any case
 237   __ ba(false, Lcontinue);
 238   __ delayed()->nop();
 239 
 240 }
 241 
 242 
 243 // End of helpers
 244 
 245 // Various method entries
 246 
 247 // Abstract method entry
 248 // Attempt to execute abstract method. Throw exception
 249 //
 250 address InterpreterGenerator::generate_abstract_entry(void) {
 251   address entry = __ pc();
 252   // abstract method entry
 253   // throw exception
 254   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
 255   // the call_VM checks for exception, so we should never return here.
 256   __ should_not_reach_here();
 257   return entry;
 258 




 174     __ andcc(G4_scratch, sig_mask, G3_scratch);
 175     __ br(Assembler::zero, false, Assembler::pt, NonFloatArg);
 176     __ delayed()->nop();
 177 
 178     __ cmp(G3_scratch, float_sig );
 179     __ br(Assembler::equal, false, Assembler::pt, LoadFloatArg);
 180     __ delayed()->nop();
 181 
 182     __ cmp(G3_scratch, double_sig );
 183     __ br(Assembler::equal, false, Assembler::pt, LoadDoubleArg);
 184     __ delayed()->nop();
 185 
 186     __ bind(NonFloatArg);
 187     // There are only 6 integer register arguments!
 188     if ( ldarg.is_register() )
 189       __ ld_ptr(ldarg.address_in_frame(), ldarg.as_register());
 190     else {
 191     // Optimization, see if there are any more args and get out prior to checking
 192     // all 16 float registers.  My guess is that this is rare.
 193     // If is_register is false, then we are done the first six integer args.
 194       __ br_null_short(G4_scratch, Assembler::pt, done);



 195     }
 196     __ ba(NextArg);
 197     __ delayed()->srl( G4_scratch, 2, G4_scratch );
 198 
 199     __ bind(LoadFloatArg);
 200     __ ldf( FloatRegisterImpl::S, a, ldarg.as_float_register(), 4);
 201     __ ba(NextArg);
 202     __ delayed()->srl( G4_scratch, 2, G4_scratch );
 203 
 204     __ bind(LoadDoubleArg);
 205     __ ldf( FloatRegisterImpl::D, a, ldarg.as_double_register() );
 206     __ ba(NextArg);
 207     __ delayed()->srl( G4_scratch, 2, G4_scratch );
 208 
 209     __ bind(NextArg);
 210 
 211   }
 212 
 213   __ bind(done);
 214   __ ret();
 215   __ delayed()->
 216      restore(O0, 0, Lscratch);  // caller's Lscratch gets the result handler
 217   return entry;
 218 }
 219 #endif
 220 
 221 void InterpreterGenerator::generate_counter_overflow(Label& Lcontinue) {
 222 
 223   // Generate code to initiate compilation on the counter overflow.
 224 
 225   // InterpreterRuntime::frequency_counter_overflow takes two arguments,
 226   // the first indicates if the counter overflow occurs at a backwards branch (NULL bcp)
 227   // and the second is only used when the first is true.  We pass zero for both.
 228   // The call returns the address of the verified entry point for the method or NULL
 229   // if the compilation did not complete (either went background or bailed out).
 230   __ set((int)false, O2);
 231   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), O2, O2, true);
 232   // returns verified_entry_point or NULL
 233   // we ignore it in any case
 234   __ ba_short(Lcontinue);

 235 
 236 }
 237 
 238 
 239 // End of helpers
 240 
 241 // Various method entries
 242 
 243 // Abstract method entry
 244 // Attempt to execute abstract method. Throw exception
 245 //
 246 address InterpreterGenerator::generate_abstract_entry(void) {
 247   address entry = __ pc();
 248   // abstract method entry
 249   // throw exception
 250   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
 251   // the call_VM checks for exception, so we should never return here.
 252   __ should_not_reach_here();
 253   return entry;
 254 


src/cpu/sparc/vm/interpreter_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File