[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Bug in tcc
From: |
Daniel Glöckner |
Subject: |
Re: [Tinycc-devel] Bug in tcc |
Date: |
Sun, 24 Sep 2006 18:39:22 +0200 |
User-agent: |
Mutt/1.4.2.1i |
Patch is attached.
save_reg tried to save a floating point value from the value stack
because its r2 contained 0 (== TREG_EAX), but r2 is valid only for
VT_LLONG.
Daniel
diff -rud a/tcc.c b/tcc.c
--- a/tcc.c Sun Sep 24 18:34:55 2006
+++ b/tcc.c Sun Sep 24 18:35:16 2006
@@ -4585,7 +4585,8 @@
l = 0;
for(p=vstack;p<=vtop;p++) {
if ((p->r & VT_VALMASK) == r ||
- (p->r2 & VT_VALMASK) == r) {
+ ((p->type.t & VT_BTYPE) == VT_LLONG &&
+ (p->r2 & VT_VALMASK) == r)) {
/* must save value on stack if not already done */
if (!saved) {
/* NOTE: must reload 'r' because r might be equal to r2 */