1// -*- mode:c++ -*- 2 3// Copyright (c) 2006 The Regents of The University of Michigan 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 119 unchanged lines hidden (view full) --- 128output header {{ 129 std::string inst2string(MachInst machInst); 130}}; 131 132output decoder {{ 133 134std::string inst2string(MachInst machInst) 135{ |
136 std::string str = ""; |
137 uint32_t mask = 0x80000000; 138 139 for(int i=0; i < 32; i++) { 140 if ((machInst & mask) == 0) { 141 str += "0"; 142 } else { 143 str += "1"; 144 } --- 45 unchanged lines hidden --- |