Skip to content

Commit

Permalink
Merge branch '2.1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
acaldero committed Jan 2, 2021
2 parents 36e02b4 + 2005f97 commit a5d7053
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 38 deletions.
28 changes: 14 additions & 14 deletions examples/microcode/mc-ep_mips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ and reg1 reg2 reg3 {
}

andi reg1 reg2 val {
co=111111,
co=001100,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -187,7 +187,7 @@ or reg1 reg2 reg3 {
}

ori reg1 reg2 val {
co=111111,
co=001101,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -246,7 +246,7 @@ xor reg1 reg2 reg3 {
}

xori reg1 reg2 val {
co=111111,
co=001110,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -309,7 +309,7 @@ slt reg1 reg2 reg3 {
}

slti reg1 reg2 val {
co=111111,
co=001010,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -378,7 +378,7 @@ addu reg1 reg2 reg3 {
}

addi reg1 reg2 val {
co=111111,
co=001000,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand All @@ -402,7 +402,7 @@ addi reg1 reg2 val {
}

addiu reg1 reg2 val {
co=111111,
co=001001,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -882,7 +882,7 @@ lb reg1 (reg2) {
}

lb reg1 val(reg2) {
co=111111,
co=100000,
nwords=1,
reg1 = reg(25,21),
val = inm(15,0),
Expand Down Expand Up @@ -913,7 +913,7 @@ lb reg1 val(reg2) {
}

lbu reg1 (reg2) {
co=111111,
co=100100,
nwords=1,
reg1 = reg(25,21),
reg2 = reg(20,16),
Expand Down Expand Up @@ -965,7 +965,7 @@ sb reg1 (reg2) {
}

sb reg1 val(reg2) {
co=111111,
co=101000,
nwords=1,
reg1 = reg(25,21),
val = inm(15,0),
Expand Down Expand Up @@ -1018,7 +1018,7 @@ lw reg1 (reg2) {
}

lw reg1 val(reg2) {
co=111111,
co=100011,
nwords=1,
reg1 = reg(25,21),
val = inm(15,0),
Expand Down Expand Up @@ -1116,7 +1116,7 @@ out reg val {
#

beq reg1 reg2 offset {
co=111111,
co=000100,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -1145,7 +1145,7 @@ beq reg1 reg2 offset {
}

bne reg1 reg2 offset {
co=111111,
co=000101,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -1295,7 +1295,7 @@ ble reg reg offset {
#

j addr {
co=111111,
co=000010,
nwords=1,
addr=address(15,0)abs,
help='pc = addr',
Expand All @@ -1311,7 +1311,7 @@ j addr {
}

jal addr {
co=111111,
co=000011,
nwords=1,
addr=address(15,0)abs,
help='$ra = pc; pc = addr',
Expand Down
19 changes: 15 additions & 4 deletions sim_sw/sim_lang_asm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1380,12 +1380,23 @@ function read_text ( context, datosCU, ret )

// ref has the associated information in firmware for this instruction
var ref = firmware[instruction][candidate] ;
var new_ref = ref ;
while (false === ref.isPseudoinstruction)
{
var ref = datosCU.cocop_hash[firmware[instruction][candidate].co] ;
if (ref.withcop)
ref = ref[firmware[instruction][candidate].cop] ;
else ref = ref.i ;
var new_ref = datosCU.cocop_hash[firmware[instruction][candidate].co] ;
if (new_ref.withcop)
new_ref = new_ref[firmware[instruction][candidate].cop] ;
else new_ref = new_ref.i ;

// <TO-CHECK:
if (typeof new_ref == "undefined") {
ref = datosCU.cocop_hash[firmware[instruction][candidate].co] ;
ref = ref.i ;
break ;
}
// </TO-CHECK:

ref = new_ref ;
}

// process machine code with several words...
Expand Down
6 changes: 4 additions & 2 deletions wepsim_core/wepsim_execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,10 @@
cycles_limit: get_cfg('DBG_limitick')
} ;
ret = wepsim_execute_chunk(options, chunk) ;
if ( (ret.ok == false) && (ret.msg_level.trim() != '') )
if ( (ret.ok == false) && (ret.msg.trim() != '') )
{
wepsim_show_stopbyevent(ret.msg_level, ret.msg) ;
wepsim_execute_stop() ;
}

return ret.ok ;
Expand Down Expand Up @@ -467,8 +468,9 @@
var ret = wepsim_execute_chunk(options, turbo) ;
if (ret.ok == false)
{
if (ret.msg_level.trim() != '') {
if (ret.msg.trim() != '') {
wepsim_show_stopbyevent(ret.msg_level, ret.msg) ;
wepsim_execute_stop() ;
}
return ;
}
Expand Down
28 changes: 14 additions & 14 deletions ws_dist/examples/microcode/mc-ep_mips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ and reg1 reg2 reg3 {
}

andi reg1 reg2 val {
co=111111,
co=001100,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -187,7 +187,7 @@ or reg1 reg2 reg3 {
}

ori reg1 reg2 val {
co=111111,
co=001101,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -246,7 +246,7 @@ xor reg1 reg2 reg3 {
}

xori reg1 reg2 val {
co=111111,
co=001110,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -309,7 +309,7 @@ slt reg1 reg2 reg3 {
}

slti reg1 reg2 val {
co=111111,
co=001010,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -378,7 +378,7 @@ addu reg1 reg2 reg3 {
}

addi reg1 reg2 val {
co=111111,
co=001000,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand All @@ -402,7 +402,7 @@ addi reg1 reg2 val {
}

addiu reg1 reg2 val {
co=111111,
co=001001,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -882,7 +882,7 @@ lb reg1 (reg2) {
}

lb reg1 val(reg2) {
co=111111,
co=100000,
nwords=1,
reg1 = reg(25,21),
val = inm(15,0),
Expand Down Expand Up @@ -913,7 +913,7 @@ lb reg1 val(reg2) {
}

lbu reg1 (reg2) {
co=111111,
co=100100,
nwords=1,
reg1 = reg(25,21),
reg2 = reg(20,16),
Expand Down Expand Up @@ -965,7 +965,7 @@ sb reg1 (reg2) {
}

sb reg1 val(reg2) {
co=111111,
co=101000,
nwords=1,
reg1 = reg(25,21),
val = inm(15,0),
Expand Down Expand Up @@ -1018,7 +1018,7 @@ lw reg1 (reg2) {
}

lw reg1 val(reg2) {
co=111111,
co=100011,
nwords=1,
reg1 = reg(25,21),
val = inm(15,0),
Expand Down Expand Up @@ -1116,7 +1116,7 @@ out reg val {
#

beq reg1 reg2 offset {
co=111111,
co=000100,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -1145,7 +1145,7 @@ beq reg1 reg2 offset {
}

bne reg1 reg2 offset {
co=111111,
co=000101,
nwords=1,
reg1=reg(25,21),
reg2=reg(20,16),
Expand Down Expand Up @@ -1295,7 +1295,7 @@ ble reg reg offset {
#

j addr {
co=111111,
co=000010,
nwords=1,
addr=address(15,0)abs,
help='pc = addr',
Expand All @@ -1311,7 +1311,7 @@ j addr {
}

jal addr {
co=111111,
co=000011,
nwords=1,
addr=address(15,0)abs,
help='$ra = pc; pc = addr',
Expand Down
2 changes: 1 addition & 1 deletion ws_dist/min.sim_all.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ws_dist/min.wepsim_core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ws_dist/min.wepsim_node.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ws_dist/min.wepsim_web.js

Large diffs are not rendered by default.

0 comments on commit a5d7053

Please sign in to comment.