diff options
Diffstat (limited to 'backend/unittests/Target')
| -rw-r--r-- | backend/unittests/Target/RISCVAssemblyPrinterTest.cpp | 2 | ||||
| -rw-r--r-- | backend/unittests/Target/RISCVCodeGenTest.cpp | 10 | ||||
| -rw-r--r-- | backend/unittests/Target/RISCVMCTest.cpp | 2 | ||||
| -rw-r--r-- | backend/unittests/Target/RISCVObjectFileTest.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/backend/unittests/Target/RISCVAssemblyPrinterTest.cpp b/backend/unittests/Target/RISCVAssemblyPrinterTest.cpp index e40ce8a..3794227 100644 --- a/backend/unittests/Target/RISCVAssemblyPrinterTest.cpp +++ b/backend/unittests/Target/RISCVAssemblyPrinterTest.cpp @@ -45,7 +45,7 @@ makeObject(std::string Symbol, std::uint64_t Size, std::uint64_t Alignment, } [[nodiscard]] rcc::Expected<void> addObjects(rcc::CompilationUnit &Unit) { - auto AnswerValue = rcc::IntegerImmediate::fromUnsigned(32, 42); + auto AnswerValue = rcc::APInt::fromUnsigned(32, 42); if (!AnswerValue) return std::unexpected(AnswerValue.error()); auto Answer = diff --git a/backend/unittests/Target/RISCVCodeGenTest.cpp b/backend/unittests/Target/RISCVCodeGenTest.cpp index c5fc10a..1bc3361 100644 --- a/backend/unittests/Target/RISCVCodeGenTest.cpp +++ b/backend/unittests/Target/RISCVCodeGenTest.cpp @@ -347,8 +347,8 @@ void testClassification(TestContext &Context) { return; const std::array<std::uint64_t, 1> SingleWords{0x3f800000U}; const std::array<std::uint64_t, 1> DoubleWords{0x3ff0000000000000ULL}; - auto SingleBits = rcc::FloatingPointBits::create(rcc::FloatSemantics::IEEESingle, SingleWords); - auto DoubleBits = rcc::FloatingPointBits::create(rcc::FloatSemantics::IEEEDouble, DoubleWords); + auto SingleBits = rcc::APFloat::create(rcc::FloatSemantics::IEEESingle, SingleWords); + auto DoubleBits = rcc::APFloat::create(rcc::FloatSemantics::IEEEDouble, DoubleWords); Context.expect(SingleBits.has_value() && DoubleBits.has_value(), "floating constant payloads must be constructible"); if (!SingleBits || !DoubleBits) @@ -875,7 +875,7 @@ void testAtomicCompareExchangeLegalization(TestContext &Context) { if (!AddressDefinition || !AddressDefinition->addDef(*Address) || !AddressDefinition->build()) return; const auto BuildConstant = [&](rcc::Register Destination, std::uint64_t Value) -> bool { - auto Immediate = rcc::IntegerImmediate::fromUnsigned(8, Value); + auto Immediate = rcc::APInt::fromUnsigned(8, Value); auto Pending = Builder.buildInstr(rcc::opcode(rcc::GenericOpcode::G_CONSTANT)); return Immediate && Pending && Pending->addDef(Destination) && Pending->addIntegerImmediate(std::move(*Immediate)) && Pending->build(); @@ -1013,7 +1013,7 @@ void testConstantExtensionPreservesLiveSource(TestContext &Context) { auto Source = (*Function)->registerInfo().createVirtualRegister(*I32); auto Extended = (*Function)->registerInfo().createVirtualRegister(*I64); auto PreservedUse = (*Function)->registerInfo().createVirtualRegister(*I32); - auto Immediate = rcc::IntegerImmediate::fromUnsigned(32, 7); + auto Immediate = rcc::APInt::fromUnsigned(32, 7); if (!Source || !Extended || !PreservedUse || !Immediate) return; @@ -1060,7 +1060,7 @@ void testIntegerCompareReusesConstantExtension(TestContext &Context) { rcc::MachineInstr *Compare = Function->firstBlock()->firstInstruction(); const rcc::Register *Right = Compare->operandAt(3)->getIf<rcc::Register>(); auto WideRight = Function->registerInfo().createVirtualRegister(*I64); - auto Immediate = rcc::IntegerImmediate::fromUnsigned(32, 0); + auto Immediate = rcc::APInt::fromUnsigned(32, 0); if (Right == nullptr || !WideRight || !Immediate) return; diff --git a/backend/unittests/Target/RISCVMCTest.cpp b/backend/unittests/Target/RISCVMCTest.cpp index d77899a..f43c574 100644 --- a/backend/unittests/Target/RISCVMCTest.cpp +++ b/backend/unittests/Target/RISCVMCTest.cpp @@ -260,7 +260,7 @@ symbolExpression(rcc::mc::MCContext &Context, std::string_view Name, std::uint32 [[nodiscard]] bool testObjectEmission(const rcc::TargetDescription &Target) { auto Alignment = rcc::Alignment::create(8); - auto Value = rcc::IntegerImmediate::fromUnsigned(64, 0x1122334455667788ULL); + auto Value = rcc::APInt::fromUnsigned(64, 0x1122334455667788ULL); if (!Alignment || !Value) return false; rcc::GlobalObjectDesc Global; diff --git a/backend/unittests/Target/RISCVObjectFileTest.cpp b/backend/unittests/Target/RISCVObjectFileTest.cpp index 1b6d1f7..95ed5c8 100644 --- a/backend/unittests/Target/RISCVObjectFileTest.cpp +++ b/backend/unittests/Target/RISCVObjectFileTest.cpp @@ -293,7 +293,7 @@ private: [[nodiscard]] rcc::Expected<rcc::GlobalInitializer> integer(std::uint32_t Bits, std::uint64_t Value) { - auto Immediate = rcc::IntegerImmediate::fromUnsigned(Bits, Value); + auto Immediate = rcc::APInt::fromUnsigned(Bits, Value); if (!Immediate) return std::unexpected(Immediate.error()); return rcc::GlobalInitializer::integer(std::move(*Immediate)); |
