From 2a98a6a4912a5fa84a444f03f9056dbc0651e9e8 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 23 Sep 2014 17:59:26 +0000 Subject: 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@ --- sys/arch/amd64/stand/libsa/time.c | 4 ++-- sys/arch/i386/stand/libsa/time.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sys') 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; -- cgit v1.2.3