sim: added [st|ld]x
[calu.git] / 3c_disasm / disasm.cpp
index 0c6c5f09119e6dde572aa5e20ec2cf3f831b3f73..c117bb047730a625063677756586cef00999d3d8 100644 (file)
@@ -10,8 +10,13 @@ Iinstr* disasm::decode(std::string str)
        string hex = "0x";
        hex.append(str);
 
-       unsigned int val =  lexical_cast<uint32_from_hex>(hex);
+       CDat val =  lexical_cast<uint32_from_hex>(hex);
+       return this->decodeNum(val);
+}
+
 
+Iinstr* disasm::decodeNum(CDat val)
+{
        dynamic_bitset<> bits(32,val), opcode(32,val), condition(9), args(32);
 
        args = opcode;