Wrong output

114 views
Skip to first unread message

Sam

unread,
Oct 3, 2020, 4:54:59 PM10/3/20
to cmpt-295-sfu

SFU ID: 301404717
Github username:ahmadsami07
Github: Link to github repo (your assignment repos are private so these links are only accessible to TAs and Instructor): https://github.com/CMPT-295-SFU/assignment-2-ahmadsami07
Line and file: NA
Expected behavior: jal and beq


Observed behavior:My lui seems to be giving the accurate outputs, but jal output is not, the offset is coming as huge values(1024,2048 etc). Is there some error in my offsetting?  Moreover, my beq is showing -31 in the last offset, is it because I am using 1 bit extra which is supposedly unneeded?

A nudge to the right direction would be very appreciated thank you

Parmida Vahdatnia

unread,
Oct 3, 2020, 5:52:48 PM10/3/20
to cmpt-295-sfu
it looks like in your  get_jump_offset  function, you are masking utype.imm instead of ujtype. also, the masking process should be changed as well. 
Reply all
Reply to author
Forward
0 new messages