[PATCH] Fix bug, "-128:f" is interpreted as a very large integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



add (1) g0<1>:f g0<1,1,1>:f -128.0:f;
add (1) g0<1>:f g0<1,1,1>:f -128:f;
should generate same binary code
---
 src/gram.y |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gram.y b/src/gram.y
index bd55052..5e009da 100644
--- a/src/gram.y
+++ b/src/gram.y
@@ -1743,7 +1743,7 @@ imm32reg:	imm32 srcimmtype
 		      intfloat.f = $1.u.f;
 		      break;
 		    case imm32_d:
-		      intfloat.f = (float) $1.u.d;
+		      intfloat.f = $1.u.signed_d;
 		      break;
 		    default:
 		      fprintf (stderr, "non-float F representation\n");
-- 
1.7.10.4



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux