summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-09-16 19:24:07 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-09-16 19:24:07 +0000
commit77c94e75b646415b3f468e316384c7b6e6af1dce (patch)
tree32c796ed26e603838b5f7e39730f395b65145fcb
parentb31ac0ff75b8156fdbc83dcd8c7bae885412d681 (diff)
Merge from ragge's tree:
Needed an extra check for leal to avoid --. Reported by otto.
-rw-r--r--usr.bin/pcc/arch/x86/local2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/pcc/arch/x86/local2.c b/usr.bin/pcc/arch/x86/local2.c
index 4da1a26e0cd..fc96a741f6a 100644
--- a/usr.bin/pcc/arch/x86/local2.c
+++ b/usr.bin/pcc/arch/x86/local2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: local2.c,v 1.2 2007/09/15 22:04:38 ray Exp $ */
+/* $Id: local2.c,v 1.3 2007/09/16 19:24:06 otto Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -1043,7 +1043,8 @@ special(NODE *p, int shape)
return SRREG;
break;
case SPCON:
- if (o != ICON || p->n_name[0] || p->n_lval < 0)
+ if (o != ICON || p->n_name[0] ||
+ p->n_lval < 0 || p->n_lval > 0x7fffffff)
break;
return SRDIR;
}