From 3dcece4c8eb93f6f18c1faa46d2d0eb029bf8276 Mon Sep 17 00:00:00 2001 From: jsg <> Date: Mon, 3 May 2010 07:22:07 +0000 Subject: When running in pic mode we don't have enough general registers for all the xcrypt inputs, hence the dance which is done to make this work. The constraint for the key however was "mr" which is both from memory and from a general register, it seems gcc3 went with the former and gcc4 went with the later in the pic case, so change the constraint for the key to just "m" which gives us more efficient code that both gcc3 and gcc4 are happy with. ok kettenis@ --- src/lib/libcrypto/engine/hw_cryptodev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/libcrypto') diff --git a/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c index 4af40cdfc3..de2ee1efea 100644 --- a/src/lib/libcrypto/engine/hw_cryptodev.c +++ b/src/lib/libcrypto/engine/hw_cryptodev.c @@ -623,7 +623,7 @@ viac3_xcrypt_cbc(int *cw, const void *src, void *dst, void *key, int rep, * -pic mode uses that register; so instead we must dance a little. */ __asm __volatile("pushl %%ebx; movl %0, %%ebx; rep xcrypt-cbc; popl %%ebx" : - : "mr" (key), "a" (iv), "c" (rep), "d" (cw), "S" (src), "D" (dst) + : "m" (key), "a" (iv), "c" (rep), "d" (cw), "S" (src), "D" (dst) : "memory", "cc"); } -- cgit v1.2.3-55-g6feb