From 740f1d5f7563556f3f194f5e548562b027377af9 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 25 Apr 1996 08:38:05 +0000 Subject: [PATCH] fix in cmpxchg instruction; i486 book is wrong --- mach/i386/as/mach3.c | 4 ++-- mach/i386/as/mach4.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mach/i386/as/mach3.c b/mach/i386/as/mach3.c index f2b1124c0..1a348b584 100644 --- a/mach/i386/as/mach3.c +++ b/mach/i386/as/mach3.c @@ -411,8 +411,8 @@ /* Intel 486 instructions */ 0, EXTOPBW, 0xC0, "xaddb", 0, EXTOPBW, 0xC1, "xadd", -0, EXTOPBW, 0xA6, "cmpxchgb", -0, EXTOPBW, 0xA7, "cmpxchg", +0, EXTOPBW, 0xB0, "cmpxchgb", +0, EXTOPBW, 0xB1, "cmpxchg", 0, BSWAP, 0xC8, "bswap", 0, NOOP_2, 017+(010<<8), "invd", 0, EXTOP1, 071, "invlpg", diff --git a/mach/i386/as/mach4.c b/mach/i386/as/mach4.c index 711c3c71e..178300257 100644 --- a/mach/i386/as/mach4.c +++ b/mach/i386/as/mach4.c @@ -199,9 +199,9 @@ oper : NOOP_1 /* 486 instructions */ | BSWAP R32 { emit1(0xF); emit1($1|$2); } - | EXTOPBW reg ',' ea_2 + | EXTOPBW ea_2 ',' reg { regsize($1); - emit1(0xF); emit1($1); ea_2($2<<3); + emit1(0xF); emit1($1); ea_2($4<<3); } ; -- 2.34.1