diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2014-09-23 17:59:26 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2014-09-23 17:59:26 +0000 |
commit | 2a98a6a4912a5fa84a444f03f9056dbc0651e9e8 (patch) | |
tree | 7c85edc28531d1e76053bf265fab085d23313da0 /sys | |
parent | 99e947d0556b9a041ed3b9c81eaddd18d8f62d83 (diff) |
Fix constraint.
We need a register here, and not a generic memory reference. We get lucky
with GCC that it chooses a register for "p", but we can't blame clang for
choosing a memory reference if we allow it to do so.
Pointed out by LLVM.
time.c:80:17: error: unexpected token in memory operand
ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/stand/libsa/time.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/time.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/amd64/stand/libsa/time.c b/sys/arch/amd64/stand/libsa/time.c index d502d8a901d..f55d642a0b0 100644 --- a/sys/arch/amd64/stand/libsa/time.c +++ b/sys/arch/amd64/stand/libsa/time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: time.c,v 1.4 2014/03/29 18:09:28 guenther Exp $ */ +/* $OpenBSD: time.c,v 1.5 2014/09/23 17:59:25 brad Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -83,7 +83,7 @@ bios_time_date(int f, u_int8_t *b) "movb %%dh, 2(%2)\n\t" "movb %%dl, 3(%2)\n\t" : "=a" (f) - : "0" (f), "p" (b) : "%ecx", "%edx", "cc"); + : "0" (f), "r" (b) : "%ecx", "%edx", "cc"); if (f & 0xff) return -1; diff --git a/sys/arch/i386/stand/libsa/time.c b/sys/arch/i386/stand/libsa/time.c index ddcdc10c626..d1612a3ccdc 100644 --- a/sys/arch/i386/stand/libsa/time.c +++ b/sys/arch/i386/stand/libsa/time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: time.c,v 1.18 2014/03/29 18:09:29 guenther Exp $ */ +/* $OpenBSD: time.c,v 1.19 2014/09/23 17:59:25 brad Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -83,7 +83,7 @@ bios_time_date(int f, u_int8_t *b) "movb %%dh, 2(%2)\n\t" "movb %%dl, 3(%2)\n\t" : "=a" (f) - : "0" (f), "p" (b) : "%ecx", "%edx", "cc"); + : "0" (f), "r" (b) : "%ecx", "%edx", "cc"); if (f & 0xff) return -1; |