Comments (5)
.text 0x00400000
jal x0, label2
.text 0x00408080
label1:
lw x1, 0(x1)
.text 0x004085e8
label2:
jal x1, label1
lw x2, 0(x2)
from rars.
This first branch, from 0x40 0000 to 0x40 85e8, is well within the 20-bit immediate range of the JAL U-Type instruction.
from rars.
Thanks for the report. This is a problem in the assembler; the instruction encoding for jal
is J-type
as it should be.
The relevant lines in the assembler are
rars/rars/ProgramStatement.java
Lines 244 to 247 in 9ff2b88
It should be possible to fix this simply by changing those lines to reflect the 20 bit range, but finding that raised some questions about by jalr
isn't handled nearby so I am going to do some more investigation.
from rars.
bd77755, fixes the size checks for jal
and branches as it turns out >12bit offsets are allowed.
I would appreciate it if you confirmed that it now works as expected.
from rars.
from rars.
Related Issues (20)
- opening rars in linux HOT 1
- Global pointer value
- BLT instruction machine code is not correct according to the document
- Crashed while executing ./test/selfmod.s HOT 1
- Native Executable HOT 1
- 0.0 + 0.0 = 0x7dc00000? HOT 2
- Enhancement: assemble new file without saving
- Feature request: GUI size and font size HOT 1
- Messages/Run I/O display console stuck in near-minimized form HOT 2
- Version 1.6 command line mode does not print register content after the run HOT 3
- sbrk problem HOT 1
- Error in Floating Point Representation tool about subnormal numbers?
- Could not find or load main class HOT 1
- Errors in Help
- Typo in syscalls help of RARS 1.6
- MMIO keybord interrtupt not triggering. HOT 5
- less than symbol < gets lost in tooltips
- MAC Issue HOT 2
- can system call 51 (InputDialogInt) take a hex input?
- Enhancement: allow expressions for immediate values and numeric directives .byte, .half, .word, .dword, etc.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rars.