static_inst.cc (5045:bf06c4d63bf4) static_inst.cc (5121:a5f3cfdc4ee5)
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

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

193 ccprintf(os, suffix);
194 } else if (reg < Ctrl_Base_DepTag) {
195 int fpindex = reg - FP_Base_DepTag;
196 if(fpindex < NumMMXRegs) {
197 ccprintf(os, "%%mmx%d", reg - FP_Base_DepTag);
198 return;
199 }
200 fpindex -= NumMMXRegs;
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

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

193 ccprintf(os, suffix);
194 } else if (reg < Ctrl_Base_DepTag) {
195 int fpindex = reg - FP_Base_DepTag;
196 if(fpindex < NumMMXRegs) {
197 ccprintf(os, "%%mmx%d", reg - FP_Base_DepTag);
198 return;
199 }
200 fpindex -= NumMMXRegs;
201 if(fpindex < NumXMMRegs) {
201 if(fpindex < NumXMMRegs * 2) {
202 ccprintf(os, "%%xmm%d_%s", fpindex / 2,
203 (fpindex % 2) ? "high": "low");
204 return;
205 }
202 ccprintf(os, "%%xmm%d_%s", fpindex / 2,
203 (fpindex % 2) ? "high": "low");
204 return;
205 }
206 fpindex -= NumXMMRegs;
207 ccprintf(os, "%%ufp%d", fpindex);
206 fpindex -= NumXMMRegs * 2;
207 if(fpindex < NumMicroFpRegs) {
208 ccprintf(os, "%%ufp%d", fpindex);
209 return;
210 }
211 fpindex -= NumMicroFpRegs;
212 ccprintf(os, "%%st(%d)", fpindex);
208 } else {
209 switch (reg - Ctrl_Base_DepTag) {
210 default:
211 ccprintf(os, "%%ctrl%d", reg - Ctrl_Base_DepTag);
212 }
213 }
214 }
215
216 std::string X86StaticInst::generateDisassembly(Addr pc,
217 const SymbolTable *symtab) const
218 {
219 std::stringstream ss;
220
221 printMnemonic(ss, mnemonic);
222
223 return ss.str();
224 }
225}
213 } else {
214 switch (reg - Ctrl_Base_DepTag) {
215 default:
216 ccprintf(os, "%%ctrl%d", reg - Ctrl_Base_DepTag);
217 }
218 }
219 }
220
221 std::string X86StaticInst::generateDisassembly(Addr pc,
222 const SymbolTable *symtab) const
223 {
224 std::stringstream ss;
225
226 printMnemonic(ss, mnemonic);
227
228 return ss.str();
229 }
230}