X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=3c_disasm%2Fdisasm.cpp;h=c117bb047730a625063677756586cef00999d3d8;hb=59b64378e94e8db6225a30c8d62e7472c66f675b;hp=0c6c5f09119e6dde572aa5e20ec2cf3f831b3f73;hpb=12d2a7c14a42e01b6caf2a097db32404a403d213;p=calu.git diff --git a/3c_disasm/disasm.cpp b/3c_disasm/disasm.cpp index 0c6c5f0..c117bb0 100644 --- a/3c_disasm/disasm.cpp +++ b/3c_disasm/disasm.cpp @@ -10,8 +10,13 @@ Iinstr* disasm::decode(std::string str) string hex = "0x"; hex.append(str); - unsigned int val = lexical_cast(hex); + CDat val = lexical_cast(hex); + return this->decodeNum(val); +} + +Iinstr* disasm::decodeNum(CDat val) +{ dynamic_bitset<> bits(32,val), opcode(32,val), condition(9), args(32); args = opcode;