aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2024-05-01 22:49:59 +0000
committerElliott Hughes <enh@google.com>2024-05-01 22:49:59 +0000
commit86988dfeb90dbcebd47f2b98ae258a4b93dce164 (patch)
tree04939e405a7aceeaa8d5fc4c42e4b67b1b44c618
parent49aeffee4d7835072e4dfc085f27c2ce7bec381f (diff)
downloadbinary_translation-86988dfeb90dbcebd47f2b98ae258a4b93dce164.tar.gz
Remove historical cruft.
No-one cares about clang 7 any more... Change-Id: I67a3d3f1f5c5ecb925ea0dd0d3ef7d02cef100f8
-rw-r--r--assembler/include/berberis/assembler/common_x86.h6
-rw-r--r--assembler/include/berberis/assembler/x86_64.h11
2 files changed, 3 insertions, 14 deletions
diff --git a/assembler/include/berberis/assembler/common_x86.h b/assembler/include/berberis/assembler/common_x86.h
index 86453678..c67ce55a 100644
--- a/assembler/include/berberis/assembler/common_x86.h
+++ b/assembler/include/berberis/assembler/common_x86.h
@@ -785,13 +785,9 @@ inline void AssemblerX86<Assembler>::Xchgl(Register dest, Register src) {
Register other = Assembler::IsAccumulator(src) ? dest : src;
EmitInstruction<Opcodes<0x90>>(Register32Bit(other));
} else {
- // Clang 8 (after r330298) swaps these two arguments. We are comparing output
+ // Clang 8 (after r330298) puts dest before src. We are comparing output
// to clang in exhaustive test thus we want to match clang behavior exactly.
-#if __clang_major__ >= 8
EmitInstruction<Opcodes<0x87>>(Register32Bit(dest), Register32Bit(src));
-#else
- EmitInstruction<Opcodes<0x87>>(Register32Bit(src), Register32Bit(dest));
-#endif
}
}
diff --git a/assembler/include/berberis/assembler/x86_64.h b/assembler/include/berberis/assembler/x86_64.h
index ba343f86..110b55ca 100644
--- a/assembler/include/berberis/assembler/x86_64.h
+++ b/assembler/include/berberis/assembler/x86_64.h
@@ -533,22 +533,15 @@ inline void Assembler::Xchgq(Register dest, Register src) {
// We compare output to that from clang and thus want to produce the same code.
// 0x48 0x90 is suboptimal encoding for that operation (pure 0x90 does the same
// and this is what gcc + gas are producing), but this is what clang <= 8 does.
-#if __clang_major__ >= 8
if (IsAccumulator(src) && IsAccumulator(dest)) {
Emit8(0x90);
- } else
-#endif
- if (IsAccumulator(src) || IsAccumulator(dest)) {
+ } else if (IsAccumulator(src) || IsAccumulator(dest)) {
Register other = IsAccumulator(src) ? dest : src;
EmitInstruction<Opcodes<0x90>>(Register64Bit(other));
} else {
- // Clang 8 (after r330298) swaps these two arguments. We are comparing output
+ // Clang 8 (after r330298) puts dest before src. We are comparing output
// to clang in exhaustive test thus we want to match clang behavior exactly.
-#if __clang_major__ >= 8
EmitInstruction<Opcodes<0x87>>(Register64Bit(dest), Register64Bit(src));
-#else
- EmitInstruction<Opcodes<0x87>>(Register64Bit(src), Register64Bit(dest));
-#endif
}
}