-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MIPS -- add fp register; support for lwl, beqz and sltiu instructions #4513
base: dev
Are you sure you want to change the base?
Conversation
…. (with instructions tests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to check both disassembly and assembly, you will need to use da
in asm tests
Co-authored-by: Giovanni <561184+wargio@users.noreply.github.com>
Lines should start not from |
For clarity, please check also https://github.com/rizinorg/rizin/tree/dev/test#writing-assembly-tests |
I will look into the test failures more later on when I have more time, thanks! |
looks like an endianness issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many tests fail, mostly disassembly. But @wargio is working on rewriting MIPS support from scratch in capstone (see the auto-sync project #4007, #3684), I wonder if it makes sense trying to fix it in the same PR? Maybe can test only assembly for now?
[XX] db/asm/mips_32 <asm> mfhi t0
-- <asm> mfhi t0 <--> 10400000
-- assembly
--- expected
+++ actual
@@ -1,1 +1,1 @@
-10400000
+10000001
�[A�[2K
[XX] db/asm/mips_32 <asm> mflo t0
-- <asm> mflo t0 <--> 12400000
-- assembly
--- expected
+++ actual
@@ -1,1 +1,1 @@
-12400000
+12000001
�[A�[2K
[XX] db/asm/mips_32 <asm> jalr t0, t1
-- <asm> jalr t0, t1 <--> 09f82001
-- disassembly
--- expected
+++ actual
@@ -1,1 +1,1 @@
-jalr t0, t1
+jalr t1
-- assembly
--- expected
+++ actual
@@ -1,1 +1,1 @@
-09f82001
+09f8e003
�[A�[2K
[XX] db/asm/mips_32 <asm> jal 0x123456
-- <asm> jal 0x123456 <--> 5634120c
-- disassembly
--- expected
+++ actual
@@ -1,1 +1,1 @@
-jal 0x123456
+jal 0x48d158
-- assembly
--- expected
+++ actual
@@ -1,1 +1,1 @@
-5634120c
+158d040c
�[A�[2K
[XX] db/asm/mips_32 <asm> j 0x123456
-- <asm> j 0x123456 <--> 56341208
-- disassembly
--- expected
+++ actual
@@ -1,1 +1,1 @@
-j 0x123456
+j 0x48d158
-- assembly
--- expected
+++ actual
@@ -1,1 +1,1 @@
-56341208
+158d0408
[XX] db/asm/mips_32 26 OK 0 BR 92 XX 0 FX
i'm ok for the assembly |
@matteius could you please convert "da" to just "a", so that only assembly is checked, and we will merge if tests pass?Note though, some assembly tests also produce errors, please take a look at these failure as well. |
I expect the tests will fail again; I only changed to test just assembly, but I spent a bit of time trying to run the tests locally and couldn't. I was able to build rizin, and then I did:
I tried also as sudo, but that gets that exec is not found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is probably one small mistake somewhere in the assembler:
[XX] db/asm/mips_32 <asm> and t0, t1, t2
-- <asm> and t0, t1, t2 ---> 012b4824
-- assembly
--- expected
+++ actual
@@ -1,1 +1,1 @@
-012b4824
+012a4024
[XX] db/asm/mips_32 <asm> xor t0, t1, t2
-- <asm> xor t0, t1, t2 ---> 012b4826
-- assembly
--- expected
+++ actual
@@ -1,1 +1,1 @@
-012b4826
+012a4026
since i'm updating the mips code, i can also integrate these changes into rizin. |
Your checklist for this pull request
Detailed description
Also two quality of life improvements:
Test plan
I am using this code to insert instructions via cutter, and so I get console errors whenever I encounter something that cannot be assembled.
Closing issues
Maybe closes #4509 assuming the tests get run by default by existing in that directory.