$OpenBSD: patch-arch_Mips_MipsInstPrinter_c,v 1.1 2014/03/09 19:58:51 jasper Exp $

The 'mips' symbol is special on MIPS platforms, so rename it to prevent a
conflict.

--- arch/Mips/MipsInstPrinter.c.orig	Sat Feb 22 13:00:26 2014
+++ arch/Mips/MipsInstPrinter.c	Sat Feb 22 13:01:16 2014
@@ -91,12 +91,12 @@ static void set_mem_access(MCInst *MI, bool status)
 		return;
 
 	if (status) {
-		MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].type = MIPS_OP_MEM;
-		MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].mem.base = MIPS_REG_INVALID;
-		MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].mem.disp = 0;
+		MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].type = MIPS_OP_MEM;
+		MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].mem.base = MIPS_REG_INVALID;
+		MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].mem.disp = 0;
 	} else {
 		// done, create the next operand slot
-		MI->flat_insn.mips.op_count++;
+		MI->flat_insn.mipsen.op_count++;
 	}
 }
 
@@ -229,11 +229,11 @@ static void printOperand(MCInst *MI, unsigned OpNo, SS
 		reg = Mips_map_register(reg);
 		if (MI->csh->detail) {
 			if (MI->csh->doing_mem) {
-				MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].mem.base = reg;
+				MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].mem.base = reg;
 			} else {
-				MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].type = MIPS_OP_REG;
-				MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].reg = reg;
-				MI->flat_insn.mips.op_count++;
+				MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].type = MIPS_OP_REG;
+				MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].reg = reg;
+				MI->flat_insn.mipsen.op_count++;
 			}
 		}
 	}
@@ -255,7 +255,7 @@ static void printOperand(MCInst *MI, unsigned OpNo, SS
 				}
 			}
 			if (MI->csh->detail)
-				MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].mem.disp = imm;
+				MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].mem.disp = imm;
 		} else {
 			if (imm >= 0) {
 				if (imm > HEX_THRESHOLD)
@@ -270,9 +270,9 @@ static void printOperand(MCInst *MI, unsigned OpNo, SS
 			}
 
 			if (MI->csh->detail) {
-				MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].type = MIPS_OP_IMM;
-				MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].imm = imm;
-				MI->flat_insn.mips.op_count++;
+				MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].type = MIPS_OP_IMM;
+				MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].imm = imm;
+				MI->flat_insn.mipsen.op_count++;
 			}
 		}
 	}
@@ -295,9 +295,9 @@ static void printUnsignedImm(MCInst *MI, int opNum, SS
 				SStream_concat(O, "-%u", (short int)-imm);
 		}
 		if (MI->csh->detail) {
-			MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].type = MIPS_OP_IMM;
-			MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].imm = (unsigned short int)imm;
-			MI->flat_insn.mips.op_count++;
+			MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].type = MIPS_OP_IMM;
+			MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].imm = (unsigned short int)imm;
+			MI->flat_insn.mipsen.op_count++;
 		}
 	} else
 		printOperand(MI, opNum, O);
@@ -313,9 +313,9 @@ static void printUnsignedImm8(MCInst *MI, int opNum, S
 		else
 			SStream_concat(O, "%u", imm);
 		if (MI->csh->detail) {
-			MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].type = MIPS_OP_IMM;
-			MI->flat_insn.mips.operands[MI->flat_insn.mips.op_count].imm = imm;
-			MI->flat_insn.mips.op_count++;
+			MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].type = MIPS_OP_IMM;
+			MI->flat_insn.mipsen.operands[MI->flat_insn.mipsen.op_count].imm = imm;
+			MI->flat_insn.mipsen.op_count++;
 		}
 	} else
 		printOperand(MI, opNum, O);
