Deleted Added
sdiff udiff text old ( 12104:edd63f9c6184 ) new ( 12106:7784fac1b159 )
full compact
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 118 unchanged lines hidden (view full) ---

127 {"", "%s", "%sx", "", "e%sx", "", "", "", "r%sx"};
128 static const char * piFormats[9] =
129 {"", "%s", "%s", "", "e%s", "", "", "", "r%s"};
130 static const char * longFormats[9] =
131 {"", "r%sb", "r%sw", "", "r%sd", "", "", "", "r%s"};
132 static const char * microFormats[9] =
133 {"", "t%db", "t%dw", "", "t%dd", "", "", "", "t%d"};
134
135 RegIndex reg_idx = reg.index();
136
137 if (reg.isIntReg()) {
138 const char * suffix = "";
139 bool fold = reg_idx & IntFoldBit;
140 reg_idx &= ~IntFoldBit;
141
142 if (fold)
143 suffix = "h";
144 else if (reg_idx < 8 && size == 1)
145 suffix = "l";

--- 46 unchanged lines hidden (view full) ---

192 break;
193 case INTREG_R15W:
194 ccprintf(os, longFormats[size], "15");
195 break;
196 default:
197 ccprintf(os, microFormats[size], reg_idx - NUM_INTREGS);
198 }
199 ccprintf(os, suffix);
200
201 } else if (reg.isFloatReg()) {
202 if (reg_idx < NumMMXRegs) {
203 ccprintf(os, "%%mmx%d", reg_idx);
204 return;
205 }
206 reg_idx -= NumMMXRegs;
207 if (reg_idx < NumXMMRegs * 2) {
208 ccprintf(os, "%%xmm%d_%s", reg_idx / 2,
209 (reg_idx % 2) ? "high": "low");
210 return;
211 }
212 reg_idx -= NumXMMRegs * 2;
213 if (reg_idx < NumMicroFpRegs) {
214 ccprintf(os, "%%ufp%d", reg_idx);
215 return;
216 }
217 reg_idx -= NumMicroFpRegs;
218 ccprintf(os, "%%st(%d)", reg_idx);
219
220 } else if (reg.isCCReg()) {
221 ccprintf(os, "%%cc%d", reg_idx);
222
223 } else if (reg.isMiscReg()) {
224 switch (reg_idx) {
225 default:
226 ccprintf(os, "%%ctrl%d", reg_idx);
227 }
228 }
229 }
230
231 void X86StaticInst::printMem(std::ostream &os, uint8_t segment,
232 uint8_t scale, RegIndex index, RegIndex base,
233 uint64_t disp, uint8_t addressSize, bool rip) const
234 {
235 bool someAddr = false;

--- 43 unchanged lines hidden ---