question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ArchMIPS32 translation discrepency

See original GitHub issue

Hi,

This: irsb = pyvex.IRSB('\x21\x80\xA0\x00\x05\x00\x40\x10', 0x4E9598, archinfo.ArchMIPS32())

gets translated:

>>> irsb.pp()
IRSB {
   t0:Ity_I32 t1:Ity_I32 t2:Ity_I32 t3:Ity_I32 t4:Ity_I32 t5:Ity_I32 t6:Ity_I32 t7:Ity_I64 t8:Ity_I32 t9:Ity_I1 t10:Ity_I32 t11:Ity_I32 t12:Ity_I1 t13:Ity_I32 t14:Ity_I1 t15:Ity_I32 t16:Ity_I64

   00 | ------ IMark(0x4e9598, 4, 0) ------
   01 | t7 = GET:I64(r12)
   02 | t6 = 64to32(t7)
   03 | t1 = Add32(t6,0xffffa000)
   04 | t2 = Xor32(t6,0xffffa000)
   05 | t10 = And32(t2,0x80000000)
   06 | t9 = CmpEQ32(t10,0x80000000)
   07 | t8 = 1Sto32(t9)
   08 | t4 = Xor32(t1,t6)
   09 | t13 = And32(t4,0x80000000)
   10 | t12 = CmpNE32(t13,0x80000000)
   11 | t11 = 1Sto32(t12)
   12 | t15 = Or32(t8,t11)
   13 | t14 = CmpEQ32(t15,0x00000000)
   14 | if (t14) { PUT(ip) = 0x4e959c; Ijk_SigFPE_IntOvf }
   NEXT: PUT(s8) = 0x00000000004e959c; Ijk_Boring
}

But IDA and ODA say it’s:

move    $s0, $a1
beqz     $v0, loc_4E95B0

Shouldn’t there be at least 2 IMarks in the irsb?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rhelmotcommented, May 7, 2017

correct.

0reactions
nimrodparcommented, May 28, 2017

Works! thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MIPS® Architecture For Programmers Vol. III - Amazon S3
III: MIPS32® / microMIPS32™ Privileged Resource Architecture, Rev. 6.02. 4.9: TLB-Based Virtual Address Translation .
Read more >
MIPS Assembly Language Programmer's Guide
This book describes the assembly language supported by the RISCompiler system, its syntax rules, and how to write assembly programs. For.
Read more >
MIPS32™ Architecture For Programmers Volume II - Cornell CS
MIPS32 ™ Architecture For Programmers Volume II, Revision 0.95 ... Translation of the MIPS16 GPR number x into the corresponding 32-bit GPR ...
Read more >
Encoding MIPS Instructions Instruction Format - Math-Unipd
10.2 explains how a MIPS instruction is encoded in a binary number. Each column contains instruction encodings for a field (a contiguous group...
Read more >
LVM - ArchWiki - Arch Linux
You cannot (easily) shrink the space used by the logical volume manager, meaning the physical volumes used for the logical volumes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found