[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    powerpc: 64-bit constant loads
From:       Stefan Kempf <stefan () nefkom ! net>
Date:       2007-11-16 23:34:31
Message-ID: 20071116233431.GC22093 () murdock ! my-fqdn ! de
[Download RAW message or body]

Hi,

long long i = -128;

generates

li %r4, -128
li %r4, 0

while it should be

li %r4, -128
li %r3, -1

Index: table.c
===================================================================
RCS file: /cvsroot/pcc/arch/powerpc/table.c,v
retrieving revision 1.6
diff -u -p -r1.6 table.c
--- table.c	1 Nov 2007 10:50:45 -0000	1.6
+++ table.c	16 Nov 2007 23:27:19 -0000
@@ -1042,7 +1042,7 @@ struct optab table[] = {
 	SSCON,	TANY,
 		NBREG,	RESC1,
 		"	li A1,AL" COM "load 16-bit constant\n"
-		"	li U1,0\n", },
+		"	li U1,UL\n", },
 
 /* load from constant */
 { OPLTYPE,	INAREG,
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic