Here's a patch which allows cpu/i8085.c to compile on x86 platforms when 
using -O3 with gcc-3.1.

P.S. I should be able to put out a release candidate for xmess-0.561.1 in 
the next couple of days.  I'm going to be careful with this one since I'm 
trying to juggle changes between two or three different trees.
diff -Nur virgin-0.60/src/cpu/i8085/i8085cpu.h xmame-0.60.2/src/cpu/i8085/i8085cpu.h
--- virgin-0.60/src/cpu/i8085/i8085cpu.h        Tue May 14 23:18:22 2002
+++ xmame-0.60.2/src/cpu/i8085/i8085cpu.h       Tue May 14 20:36:39 2002
@@ -73,8 +73,8 @@
  " shlb $2,%%al         \n" /* shift to P/V bit position */     \
  " andb $0xd1,%%ah      \n" /* sign, zero, half carry, carry */ \
  " orb %%ah,%%al        \n"                                     \
- :"=g" (I.AF.b.h), "=a" (I.AF.b.l)                              \
- :"r" (R), "0" (I.AF.b.h)                                       \
+ :"=mq" (I.AF.b.h), "=a" (I.AF.b.l)                              \
+ :"q" (R), "0" (I.AF.b.h)                                       \
  )
 #else
 #define M_ADD(R) {                                                                    
                         \
@@ -96,8 +96,8 @@
  " shlb $2,%%al         \n" /* shift to P/V bit position */     \
  " andb $0xd1,%%ah      \n" /* sign, zero, half carry, carry */ \
  " orb %%ah,%%al        \n" /* combine with P/V */              \
- :"=g" (I.AF.b.h), "=a" (I.AF.b.l)                              \
- :"r" (R), "a" (I.AF.b.l), "0" (I.AF.b.h)                       \
+ :"=mq" (I.AF.b.h), "=a" (I.AF.b.l)                              \
+ :"q" (R), "a" (I.AF.b.l), "0" (I.AF.b.h)                       \
  )
 #else
 #define M_ADC(R) {                                                                    
                         \
@@ -119,8 +119,8 @@
  " andb $0xd1,%%ah      \n" /* sign, zero, half carry, carry */ \
  " orb $2,%%al          \n" /* set N flag */                    \
  " orb %%ah,%%al        \n" /* combine with P/V */              \
- :"=g" (I.AF.b.h), "=a" (I.AF.b.l)                              \
- :"r" (R), "0" (I.AF.b.h)                                       \
+ :"=mq" (I.AF.b.h), "=a" (I.AF.b.l)                              \
+ :"q" (R), "0" (I.AF.b.h)                                       \
  )
 #else
 #define M_SUB(R) {                                                                    
                         \
@@ -143,8 +143,8 @@
  " andb $0xd1,%%ah      \n" /* sign, zero, half carry, carry */ \
  " orb $2,%%al          \n" /* set N flag */                    \
  " orb %%ah,%%al        \n" /* combine with P/V */              \
- :"=g" (I.AF.b.h), "=a" (I.AF.b.l)                              \
- :"r" (R), "a" (I.AF.b.l), "0" (I.AF.b.h)                       \
+ :"=mq" (I.AF.b.h), "=a" (I.AF.b.l)                              \
+ :"q" (R), "a" (I.AF.b.l), "0" (I.AF.b.h)                       \
  )
 #else
 #define M_SBB(R) {                                              \
@@ -166,8 +166,8 @@
  " andb $0xd1,%%ah     \n" /* sign, zero, half carry, carry */  \
  " orb $2,%%al         \n" /* set N flag */                     \
  " orb %%ah,%%al       \n" /* combine with P/V */               \
- :"=g" (I.AF.b.h), "=a" (I.AF.b.l)                              \
- :"r" (R), "0" (I.AF.b.h)                                       \
+ :"=mq" (I.AF.b.h), "=a" (I.AF.b.l)                              \
+ :"q" (R), "0" (I.AF.b.h)                                       \
  )
 #else
 #define M_CMP(R) {                                              \
@@ -195,7 +195,7 @@
  " lahf                 \n"                                     \
  " andb $0x11,%%ah      \n"                                     \
  " orb %%ah,%1          \n"                                     \
- :"=c" (I.HL.d), "=g" (I.AF.b.l)                                \
+ :"=c" (I.HL.d), "=mq" (I.AF.b.l)                                \
  :"0" (I.HL.d), "1" (I.AF.b.l), "a" (I.R.d)                     \
  )
 #else

Reply via email to