changed style, can revert changes to amomin/max
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 12 Oct 2018 15:21:11 +0000 (16:21 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 12 Oct 2018 15:21:11 +0000 (16:21 +0100)
riscv/insns/amomaxu_d.h
riscv/insns/amominu_d.h

index e5ae07f177a86ceaf3cedd7840619beed8daea29..12b173313d9e4f1636e13a67fea6785fbae8f8ae 100644 (file)
@@ -1,3 +1,3 @@
 require_extension('A');
 require_rv64;
-WRITE_RD(MMU.amo_uint64(RS1, [&](uint64_t lhs) { return (lhs > RS2) ? lhs : RS2; }));
+WRITE_RD(MMU.amo_uint64(RS1, [&](uint64_t lhs) { return std::max(lhs, RS2); }));
index a03a1d6e9882809940132cae4d9f93df26e1e373..15b6c0a48bad12e9cafd9738fe7481bc933eb974 100644 (file)
@@ -1,3 +1,3 @@
 require_extension('A');
 require_rv64;
-WRITE_RD(MMU.amo_uint64(RS1, [&](uint64_t lhs) { return (lhs < RS2) ? lhs : RS2; }));
+WRITE_RD(MMU.amo_uint64(RS1, [&](uint64_t lhs) { return std::min(lhs, RS2); }));