summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorStefan Kempf <stefan@cvs.openbsd.org>2007-11-05 22:11:43 +0000
committerStefan Kempf <stefan@cvs.openbsd.org>2007-11-05 22:11:43 +0000
commit6d17eea8801b819ed9921fbd1361f9adbbd142d4 (patch)
tree411e103c47c17be8cc9710dab7bea93136d4eb69 /usr.bin
parent5a38cece9a5cac8b439e24d39a034691a80de2af (diff)
Pull from master repo:
Fix defalign(). ok otto@, gmcgarry
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/pcc/powerpc/code.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/pcc/powerpc/code.c b/usr.bin/pcc/powerpc/code.c
index cde81183a4d..6eae9b4fd1c 100644
--- a/usr.bin/pcc/powerpc/code.c
+++ b/usr.bin/pcc/powerpc/code.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: code.c,v 1.2 2007/11/01 10:52:58 otto Exp $ */
+/* $OpenBSD: code.c,v 1.3 2007/11/05 22:11:42 stefan Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -44,10 +44,9 @@ static void genswitch_mrst(int num, struct swents **p, int n);
void
defalign(int n)
{
- n /= SZCHAR;
- if (n == 1)
- return;
- printf(" .align %d\n", n);
+ if ((n = ispow2(n / SZCHAR)) == -1)
+ cerror("defalign: n != 2^i");
+ printf(" .p2align %d\n", n);
}
/*