Skip to content

Commit 2595c47

Browse files
committed
8354231: x86: Purge FPU support from (Macro)Assembler after 32-bit x86 removal
Reviewed-by: coleenp, kvn, vlivanov
1 parent b539fb0 commit 2595c47

7 files changed

+2
-819
lines changed

src/hotspot/cpu/x86/assembler_x86.cpp

-374
Original file line numberDiff line numberDiff line change
@@ -12918,380 +12918,6 @@ void Assembler::edecl(Register dst, Register src, bool no_flags) {
1291812918
(void) evex_prefix_and_encode_ndd(0, dst->encoding(), src->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C, &attributes, no_flags);
1291912919
emit_int8(0x48 | src->encoding());
1292012920
}
12921-
12922-
// 64bit doesn't use the x87
12923-
12924-
void Assembler::fabs() {
12925-
emit_int16((unsigned char)0xD9, (unsigned char)0xE1);
12926-
}
12927-
12928-
void Assembler::fadd(int i) {
12929-
emit_farith(0xD8, 0xC0, i);
12930-
}
12931-
12932-
void Assembler::fadd_d(Address src) {
12933-
InstructionMark im(this);
12934-
emit_int8((unsigned char)0xDC);
12935-
emit_operand32(rax, src, 0);
12936-
}
12937-
12938-
void Assembler::fadd_s(Address src) {
12939-
InstructionMark im(this);
12940-
emit_int8((unsigned char)0xD8);
12941-
emit_operand32(rax, src, 0);
12942-
}
12943-
12944-
void Assembler::fadda(int i) {
12945-
emit_farith(0xDC, 0xC0, i);
12946-
}
12947-
12948-
void Assembler::faddp(int i) {
12949-
emit_farith(0xDE, 0xC0, i);
12950-
}
12951-
12952-
void Assembler::fchs() {
12953-
emit_int16((unsigned char)0xD9, (unsigned char)0xE0);
12954-
}
12955-
12956-
void Assembler::fcom(int i) {
12957-
emit_farith(0xD8, 0xD0, i);
12958-
}
12959-
12960-
void Assembler::fcomp(int i) {
12961-
emit_farith(0xD8, 0xD8, i);
12962-
}
12963-
12964-
void Assembler::fcomp_d(Address src) {
12965-
InstructionMark im(this);
12966-
emit_int8((unsigned char)0xDC);
12967-
emit_operand32(rbx, src, 0);
12968-
}
12969-
12970-
void Assembler::fcomp_s(Address src) {
12971-
InstructionMark im(this);
12972-
emit_int8((unsigned char)0xD8);
12973-
emit_operand32(rbx, src, 0);
12974-
}
12975-
12976-
void Assembler::fcompp() {
12977-
emit_int16((unsigned char)0xDE, (unsigned char)0xD9);
12978-
}
12979-
12980-
void Assembler::fcos() {
12981-
emit_int16((unsigned char)0xD9, (unsigned char)0xFF);
12982-
}
12983-
12984-
void Assembler::fdecstp() {
12985-
emit_int16((unsigned char)0xD9, (unsigned char)0xF6);
12986-
}
12987-
12988-
void Assembler::fdiv(int i) {
12989-
emit_farith(0xD8, 0xF0, i);
12990-
}
12991-
12992-
void Assembler::fdiv_d(Address src) {
12993-
InstructionMark im(this);
12994-
emit_int8((unsigned char)0xDC);
12995-
emit_operand32(rsi, src, 0);
12996-
}
12997-
12998-
void Assembler::fdiv_s(Address src) {
12999-
InstructionMark im(this);
13000-
emit_int8((unsigned char)0xD8);
13001-
emit_operand32(rsi, src, 0);
13002-
}
13003-
13004-
void Assembler::fdiva(int i) {
13005-
emit_farith(0xDC, 0xF8, i);
13006-
}
13007-
13008-
// Note: The Intel manual (Pentium Processor User's Manual, Vol.3, 1994)
13009-
// is erroneous for some of the floating-point instructions below.
13010-
13011-
void Assembler::fdivp(int i) {
13012-
emit_farith(0xDE, 0xF8, i); // ST(0) <- ST(0) / ST(1) and pop (Intel manual wrong)
13013-
}
13014-
13015-
void Assembler::fdivr(int i) {
13016-
emit_farith(0xD8, 0xF8, i);
13017-
}
13018-
13019-
void Assembler::fdivr_d(Address src) {
13020-
InstructionMark im(this);
13021-
emit_int8((unsigned char)0xDC);
13022-
emit_operand32(rdi, src, 0);
13023-
}
13024-
13025-
void Assembler::fdivr_s(Address src) {
13026-
InstructionMark im(this);
13027-
emit_int8((unsigned char)0xD8);
13028-
emit_operand32(rdi, src, 0);
13029-
}
13030-
13031-
void Assembler::fdivra(int i) {
13032-
emit_farith(0xDC, 0xF0, i);
13033-
}
13034-
13035-
void Assembler::fdivrp(int i) {
13036-
emit_farith(0xDE, 0xF0, i); // ST(0) <- ST(1) / ST(0) and pop (Intel manual wrong)
13037-
}
13038-
13039-
void Assembler::ffree(int i) {
13040-
emit_farith(0xDD, 0xC0, i);
13041-
}
13042-
13043-
void Assembler::fild_d(Address adr) {
13044-
InstructionMark im(this);
13045-
emit_int8((unsigned char)0xDF);
13046-
emit_operand32(rbp, adr, 0);
13047-
}
13048-
13049-
void Assembler::fild_s(Address adr) {
13050-
InstructionMark im(this);
13051-
emit_int8((unsigned char)0xDB);
13052-
emit_operand32(rax, adr, 0);
13053-
}
13054-
13055-
void Assembler::fincstp() {
13056-
emit_int16((unsigned char)0xD9, (unsigned char)0xF7);
13057-
}
13058-
13059-
void Assembler::finit() {
13060-
emit_int24((unsigned char)0x9B, (unsigned char)0xDB, (unsigned char)0xE3);
13061-
}
13062-
13063-
void Assembler::fist_s(Address adr) {
13064-
InstructionMark im(this);
13065-
emit_int8((unsigned char)0xDB);
13066-
emit_operand32(rdx, adr, 0);
13067-
}
13068-
13069-
void Assembler::fistp_d(Address adr) {
13070-
InstructionMark im(this);
13071-
emit_int8((unsigned char)0xDF);
13072-
emit_operand32(rdi, adr, 0);
13073-
}
13074-
13075-
void Assembler::fistp_s(Address adr) {
13076-
InstructionMark im(this);
13077-
emit_int8((unsigned char)0xDB);
13078-
emit_operand32(rbx, adr, 0);
13079-
}
13080-
13081-
void Assembler::fld1() {
13082-
emit_int16((unsigned char)0xD9, (unsigned char)0xE8);
13083-
}
13084-
13085-
void Assembler::fld_s(Address adr) {
13086-
InstructionMark im(this);
13087-
emit_int8((unsigned char)0xD9);
13088-
emit_operand32(rax, adr, 0);
13089-
}
13090-
13091-
13092-
void Assembler::fld_s(int index) {
13093-
emit_farith(0xD9, 0xC0, index);
13094-
}
13095-
13096-
void Assembler::fldcw(Address src) {
13097-
InstructionMark im(this);
13098-
emit_int8((unsigned char)0xD9);
13099-
emit_operand32(rbp, src, 0);
13100-
}
13101-
13102-
void Assembler::fldenv(Address src) {
13103-
InstructionMark im(this);
13104-
emit_int8((unsigned char)0xD9);
13105-
emit_operand32(rsp, src, 0);
13106-
}
13107-
13108-
void Assembler::fldlg2() {
13109-
emit_int16((unsigned char)0xD9, (unsigned char)0xEC);
13110-
}
13111-
13112-
void Assembler::fldln2() {
13113-
emit_int16((unsigned char)0xD9, (unsigned char)0xED);
13114-
}
13115-
13116-
void Assembler::fldz() {
13117-
emit_int16((unsigned char)0xD9, (unsigned char)0xEE);
13118-
}
13119-
13120-
void Assembler::flog() {
13121-
fldln2();
13122-
fxch();
13123-
fyl2x();
13124-
}
13125-
13126-
void Assembler::flog10() {
13127-
fldlg2();
13128-
fxch();
13129-
fyl2x();
13130-
}
13131-
13132-
void Assembler::fmul(int i) {
13133-
emit_farith(0xD8, 0xC8, i);
13134-
}
13135-
13136-
void Assembler::fmul_d(Address src) {
13137-
InstructionMark im(this);
13138-
emit_int8((unsigned char)0xDC);
13139-
emit_operand32(rcx, src, 0);
13140-
}
13141-
13142-
void Assembler::fmul_s(Address src) {
13143-
InstructionMark im(this);
13144-
emit_int8((unsigned char)0xD8);
13145-
emit_operand32(rcx, src, 0);
13146-
}
13147-
13148-
void Assembler::fmula(int i) {
13149-
emit_farith(0xDC, 0xC8, i);
13150-
}
13151-
13152-
void Assembler::fmulp(int i) {
13153-
emit_farith(0xDE, 0xC8, i);
13154-
}
13155-
13156-
void Assembler::fnsave(Address dst) {
13157-
InstructionMark im(this);
13158-
emit_int8((unsigned char)0xDD);
13159-
emit_operand32(rsi, dst, 0);
13160-
}
13161-
13162-
void Assembler::fnstcw(Address src) {
13163-
InstructionMark im(this);
13164-
emit_int16((unsigned char)0x9B, (unsigned char)0xD9);
13165-
emit_operand32(rdi, src, 0);
13166-
}
13167-
13168-
void Assembler::fprem1() {
13169-
emit_int16((unsigned char)0xD9, (unsigned char)0xF5);
13170-
}
13171-
13172-
void Assembler::frstor(Address src) {
13173-
InstructionMark im(this);
13174-
emit_int8((unsigned char)0xDD);
13175-
emit_operand32(rsp, src, 0);
13176-
}
13177-
13178-
void Assembler::fsin() {
13179-
emit_int16((unsigned char)0xD9, (unsigned char)0xFE);
13180-
}
13181-
13182-
void Assembler::fsqrt() {
13183-
emit_int16((unsigned char)0xD9, (unsigned char)0xFA);
13184-
}
13185-
13186-
void Assembler::fst_d(Address adr) {
13187-
InstructionMark im(this);
13188-
emit_int8((unsigned char)0xDD);
13189-
emit_operand32(rdx, adr, 0);
13190-
}
13191-
13192-
void Assembler::fst_s(Address adr) {
13193-
InstructionMark im(this);
13194-
emit_int8((unsigned char)0xD9);
13195-
emit_operand32(rdx, adr, 0);
13196-
}
13197-
13198-
void Assembler::fstp_s(Address adr) {
13199-
InstructionMark im(this);
13200-
emit_int8((unsigned char)0xD9);
13201-
emit_operand32(rbx, adr, 0);
13202-
}
13203-
13204-
void Assembler::fsub(int i) {
13205-
emit_farith(0xD8, 0xE0, i);
13206-
}
13207-
13208-
void Assembler::fsub_d(Address src) {
13209-
InstructionMark im(this);
13210-
emit_int8((unsigned char)0xDC);
13211-
emit_operand32(rsp, src, 0);
13212-
}
13213-
13214-
void Assembler::fsub_s(Address src) {
13215-
InstructionMark im(this);
13216-
emit_int8((unsigned char)0xD8);
13217-
emit_operand32(rsp, src, 0);
13218-
}
13219-
13220-
void Assembler::fsuba(int i) {
13221-
emit_farith(0xDC, 0xE8, i);
13222-
}
13223-
13224-
void Assembler::fsubp(int i) {
13225-
emit_farith(0xDE, 0xE8, i); // ST(0) <- ST(0) - ST(1) and pop (Intel manual wrong)
13226-
}
13227-
13228-
void Assembler::fsubr(int i) {
13229-
emit_farith(0xD8, 0xE8, i);
13230-
}
13231-
13232-
void Assembler::fsubr_d(Address src) {
13233-
InstructionMark im(this);
13234-
emit_int8((unsigned char)0xDC);
13235-
emit_operand32(rbp, src, 0);
13236-
}
13237-
13238-
void Assembler::fsubr_s(Address src) {
13239-
InstructionMark im(this);
13240-
emit_int8((unsigned char)0xD8);
13241-
emit_operand32(rbp, src, 0);
13242-
}
13243-
13244-
void Assembler::fsubra(int i) {
13245-
emit_farith(0xDC, 0xE0, i);
13246-
}
13247-
13248-
void Assembler::fsubrp(int i) {
13249-
emit_farith(0xDE, 0xE0, i); // ST(0) <- ST(1) - ST(0) and pop (Intel manual wrong)
13250-
}
13251-
13252-
void Assembler::ftan() {
13253-
emit_int32((unsigned char)0xD9, (unsigned char)0xF2, (unsigned char)0xDD, (unsigned char)0xD8);
13254-
}
13255-
13256-
void Assembler::ftst() {
13257-
emit_int16((unsigned char)0xD9, (unsigned char)0xE4);
13258-
}
13259-
13260-
void Assembler::fucomi(int i) {
13261-
// make sure the instruction is supported (introduced for P6, together with cmov)
13262-
guarantee(VM_Version::supports_cmov(), "illegal instruction");
13263-
emit_farith(0xDB, 0xE8, i);
13264-
}
13265-
13266-
void Assembler::fucomip(int i) {
13267-
// make sure the instruction is supported (introduced for P6, together with cmov)
13268-
guarantee(VM_Version::supports_cmov(), "illegal instruction");
13269-
emit_farith(0xDF, 0xE8, i);
13270-
}
13271-
13272-
void Assembler::fwait() {
13273-
emit_int8((unsigned char)0x9B);
13274-
}
13275-
13276-
void Assembler::fxch(int i) {
13277-
emit_farith(0xD9, 0xC8, i);
13278-
}
13279-
13280-
void Assembler::fyl2x() {
13281-
emit_int16((unsigned char)0xD9, (unsigned char)0xF1);
13282-
}
13283-
13284-
void Assembler::frndint() {
13285-
emit_int16((unsigned char)0xD9, (unsigned char)0xFC);
13286-
}
13287-
13288-
void Assembler::f2xm1() {
13289-
emit_int16((unsigned char)0xD9, (unsigned char)0xF0);
13290-
}
13291-
13292-
void Assembler::fldl2e() {
13293-
emit_int16((unsigned char)0xD9, (unsigned char)0xEA);
13294-
}
1329512921
#endif // !_LP64
1329612922

1329712923
// SSE SIMD prefix byte values corresponding to VexSimdPrefix encoding.

0 commit comments

Comments
 (0)