Skip to content

Commit

Permalink
Use __SOFTFP__ instead of __ABI_HARD__, shrink ifdef blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
mychris committed Jul 27, 2021
1 parent b0d8fa6 commit 13c7824
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions src/hotspot/cpu/arm/templateTable_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,38 +490,30 @@ void TemplateTable::ldc2_w() {
__ add(Rtemp, Rtags, tags_offset);
__ ldrb(Rtemp, Address(Rtemp, Rindex));

Label Condy, exit;
#ifdef __ABI_HARD__
Label NotDouble;
Label Done, NotLong, NotDouble;
__ cmp(Rtemp, JVM_CONSTANT_Double);
__ b(NotDouble, ne);
#ifdef __SOFTFP__
__ ldr(R0_tos_lo, Address(Rbase, base_offset + 0 * wordSize));
__ ldr(R1_tos_hi, Address(Rbase, base_offset + 1 * wordSize));
#else // !__SOFTFP__
__ ldr_double(D0_tos, Address(Rbase, base_offset));
#endif // __SOFTFP__
__ push(dtos);
__ b(exit);

__ b(Done);
__ bind(NotDouble);

__ cmp(Rtemp, JVM_CONSTANT_Long);
__ b(Condy, ne);
__ ldr(R0_tos_lo, Address(Rbase, base_offset + 0 * wordSize));
__ ldr(R1_tos_hi, Address(Rbase, base_offset + 1 * wordSize));
__ push(ltos);
__ b(exit);
#else // !__ABI_HARD__
__ cmp(Rtemp, JVM_CONSTANT_Long);
__ cond_cmp(Rtemp, JVM_CONSTANT_Double, ne);
__ b(Condy, ne);
__ b(NotLong, ne);
__ ldr(R0_tos_lo, Address(Rbase, base_offset + 0 * wordSize));
__ ldr(R1_tos_hi, Address(Rbase, base_offset + 1 * wordSize));
// doubles and longs are placed on the stack in the same way
// without VFP, we can push(ltos) to transfer a double value
__ push(ltos);
__ b(exit);
#endif // __ABI_HARD__
__ b(Done);
__ bind(NotLong);

__ bind(Condy);
condy_helper(exit);
condy_helper(Done);

__ bind(exit);
__ bind(Done);
}


Expand Down

0 comments on commit 13c7824

Please sign in to comment.