mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
[ARM64] Add a PostEncoderMethod to FCMP - the Rm field should canonically be zero but should be decoded/disassembled with any value.
llvm-svn: 205883
This commit is contained in:
parent
7a63e7691e
commit
12bcb7711a
@ -3502,11 +3502,13 @@ class BaseOneOperandFPComparison<bit signalAllNans,
|
||||
let Inst{31-23} = 0b000111100;
|
||||
let Inst{21} = 1;
|
||||
|
||||
let Inst{20-16} = 0b00000;
|
||||
let Inst{15-10} = 0b001000;
|
||||
let Inst{9-5} = Rn;
|
||||
let Inst{4} = signalAllNans;
|
||||
let Inst{3-0} = 0b1000;
|
||||
|
||||
// Rm should be 0b00000 canonically, but we need to accept any value.
|
||||
let PostEncoderMethod = "fixOneOperandFPComparison";
|
||||
}
|
||||
|
||||
let mayLoad = 0, mayStore = 0, hasSideEffects = 0 in
|
||||
|
@ -184,6 +184,8 @@ public:
|
||||
fixLoadStoreExclusive(const MCInst &MI, unsigned EncodedValue,
|
||||
const MCSubtargetInfo &STI) const;
|
||||
|
||||
unsigned fixOneOperandFPComparison(const MCInst &MI, unsigned EncodedValue,
|
||||
const MCSubtargetInfo &STI) const;
|
||||
};
|
||||
|
||||
} // end anonymous namespace
|
||||
@ -588,4 +590,14 @@ ARM64MCCodeEmitter::fixLoadStoreExclusive(const MCInst &MI,
|
||||
return EncodedValue;
|
||||
}
|
||||
|
||||
unsigned
|
||||
ARM64MCCodeEmitter::fixOneOperandFPComparison(const MCInst &MI,
|
||||
unsigned EncodedValue,
|
||||
const MCSubtargetInfo &STI) const {
|
||||
// The Rm field of FCMP and friends is unused - it should be assembled
|
||||
// as 0, but is ignored by the processor.
|
||||
EncodedValue &= ~(0x1f << 16);
|
||||
return EncodedValue;
|
||||
}
|
||||
|
||||
#include "ARM64GenMCCodeEmitter.inc"
|
||||
|
@ -7,3 +7,7 @@
|
||||
0x00 0x00 0x40 0x9b
|
||||
|
||||
# CHECK: smulh x0, x0, x0
|
||||
|
||||
0x08 0x20 0x21 0x1e
|
||||
|
||||
# CHECK: fcmp s0, #0.0
|
||||
|
Loading…
Reference in New Issue
Block a user