From e82e5b5084030e08aba374b0e971ecf3863ccba4 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Tue, 30 Jan 2007 11:22:22 -0500 Subject: use std:: for isnan() and fix decoding of fcmpe* --HG-- extra : convert_revision : 06be0f8572e26c3c7e761b482248304ce1afa038 --- src/arch/sparc/isa/decoder.isa | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/arch/sparc/isa') diff --git a/src/arch/sparc/isa/decoder.isa b/src/arch/sparc/isa/decoder.isa index 9658578f2..ebd19720e 100644 --- a/src/arch/sparc/isa/decoder.isa +++ b/src/arch/sparc/isa/decoder.isa @@ -738,7 +738,7 @@ decode OP default Unknown::unknown() format BasicOperate{ 0x51: fcmps({{ uint8_t fcc; - if(isnan(Frs1s) || isnan(Frs2s)) + if(std::isnan(Frs1s) || std::isnan(Frs2s)) fcc = 3; else if(Frs1s < Frs2s) fcc = 1; @@ -753,7 +753,7 @@ decode OP default Unknown::unknown() }}); 0x52: fcmpd({{ uint8_t fcc; - if(isnan(Frs1s) || isnan(Frs2s)) + if(std::isnan(Frs1s) || std::isnan(Frs2s)) fcc = 3; else if(Frs1s < Frs2s) fcc = 1; @@ -767,9 +767,9 @@ decode OP default Unknown::unknown() Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc); }}); 0x53: FpUnimpl::fcmpq(); - 0x54: fcmpes({{ + 0x55: fcmpes({{ uint8_t fcc = 0; - if(isnan(Frs1s) || isnan(Frs2s)) + if(std::isnan(Frs1s) || std::isnan(Frs2s)) fault = new FpExceptionIEEE754; if(Frs1s < Frs2s) fcc = 1; @@ -780,9 +780,9 @@ decode OP default Unknown::unknown() firstbit = FCMPCC * 2 + 30; Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc); }}); - 0x55: fcmped({{ + 0x56: fcmped({{ uint8_t fcc = 0; - if(isnan(Frs1s) || isnan(Frs2s)) + if(std::isnan(Frs1s) || std::isnan(Frs2s)) fault = new FpExceptionIEEE754; if(Frs1s < Frs2s) fcc = 1; @@ -793,7 +793,7 @@ decode OP default Unknown::unknown() firstbit = FCMPCC * 2 + 30; Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc); }}); - 0x56: FpUnimpl::fcmpeq(); + 0x57: FpUnimpl::fcmpeq(); default: FailUnimpl::fpop2(); } } -- cgit v1.2.3 From 8bc4925775432f256cfb3be67db6f0d6d7ab6a05 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Tue, 30 Jan 2007 14:43:25 -0500 Subject: change std::isnan() to a using namespace std and isnan(). We need a better way to do this. --HG-- extra : convert_revision : 4f59ca8e6425db23f57a1f3f65a4874e483d0ecc --- src/arch/sparc/isa/decoder.isa | 8 ++++---- src/arch/sparc/isa/includes.isa | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/arch/sparc/isa') diff --git a/src/arch/sparc/isa/decoder.isa b/src/arch/sparc/isa/decoder.isa index ebd19720e..2152d3d2b 100644 --- a/src/arch/sparc/isa/decoder.isa +++ b/src/arch/sparc/isa/decoder.isa @@ -738,7 +738,7 @@ decode OP default Unknown::unknown() format BasicOperate{ 0x51: fcmps({{ uint8_t fcc; - if(std::isnan(Frs1s) || std::isnan(Frs2s)) + if(isnan(Frs1s) || isnan(Frs2s)) fcc = 3; else if(Frs1s < Frs2s) fcc = 1; @@ -753,7 +753,7 @@ decode OP default Unknown::unknown() }}); 0x52: fcmpd({{ uint8_t fcc; - if(std::isnan(Frs1s) || std::isnan(Frs2s)) + if(isnan(Frs1s) || isnan(Frs2s)) fcc = 3; else if(Frs1s < Frs2s) fcc = 1; @@ -769,7 +769,7 @@ decode OP default Unknown::unknown() 0x53: FpUnimpl::fcmpq(); 0x55: fcmpes({{ uint8_t fcc = 0; - if(std::isnan(Frs1s) || std::isnan(Frs2s)) + if(isnan(Frs1s) || isnan(Frs2s)) fault = new FpExceptionIEEE754; if(Frs1s < Frs2s) fcc = 1; @@ -782,7 +782,7 @@ decode OP default Unknown::unknown() }}); 0x56: fcmped({{ uint8_t fcc = 0; - if(std::isnan(Frs1s) || std::isnan(Frs2s)) + if(isnan(Frs1s) || isnan(Frs2s)) fault = new FpExceptionIEEE754; if(Frs1s < Frs2s) fcc = 1; diff --git a/src/arch/sparc/isa/includes.isa b/src/arch/sparc/isa/includes.isa index 474af3ad9..a6dca9bf1 100644 --- a/src/arch/sparc/isa/includes.isa +++ b/src/arch/sparc/isa/includes.isa @@ -76,5 +76,6 @@ output exec {{ #include "mem/packet_access.hh" using namespace SparcISA; +using namespace std; }}; -- cgit v1.2.3