Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/master' into for-yarc
Browse files Browse the repository at this point in the history
Signed-off-by: yqszxx <[email protected]>

# Conflicts:
#	instruction/addiw.go
#	instruction/addw.go
#	instruction/csrrc.go
#	instruction/csrrci.go
#	instruction/csrrs.go
#	instruction/csrrsi.go
#	instruction/csrrw.go
#	instruction/csrrwi.go
#	instruction/ecall.go
#	instruction/fence.go
#	instruction/fence_i.go
#	instruction/ld.go
#	instruction/lwu.go
#	instruction/mret.go
#	instruction/sd.go
#	instruction/slliw.go
#	instruction/sllw.go
#	instruction/sraiw.go
#	instruction/sraw.go
#	instruction/sret.go
#	instruction/srliw.go
#	instruction/srlw.go
#	instruction/subw.go
#	main.go
#	mem/mem.go
#	processor/processor.go
#	reg/csr.go
  • Loading branch information
yqszxx committed Feb 10, 2020
2 parents c48eb36 + 50c54b2 commit cc5e5ca
Show file tree
Hide file tree
Showing 44 changed files with 63 additions and 64 deletions.
2 changes: 1 addition & 1 deletion instruction/add.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// ADD performs addition. Overflow is ignored and the low 64 bits of results are written to the
Expand Down
2 changes: 1 addition & 1 deletion instruction/addi.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// ADDI adds the sign-extended 12-bit immediate to register rs1. Arithmetic overflow is ignored and
Expand Down
2 changes: 1 addition & 1 deletion instruction/and.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// AND performs bitwise AND logical operation.
Expand Down
2 changes: 1 addition & 1 deletion instruction/andi.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// ANDI is a logical operation that performs bitwise AND on register rs1 and the sign-extended
Expand Down
2 changes: 1 addition & 1 deletion instruction/auipc.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// AUIPC (add upper immediate to pc) appends 12 low-order zero bits to the 20-bit U-immediate,
Expand Down
2 changes: 1 addition & 1 deletion instruction/beq.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// BEQ branch instruction compares two registers. It takes the branch if registers rs1 and rs2 are equal.
Expand Down
2 changes: 1 addition & 1 deletion instruction/bge.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// BGE branch instruction compares two registers. It takes the branch if rs1 is greater than or equal
Expand Down
2 changes: 1 addition & 1 deletion instruction/bgeu.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// BGEU branch instruction compares two registers. It takes the branch if rs1 is greater than or equal
Expand Down
2 changes: 1 addition & 1 deletion instruction/blt.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// BLT branch instruction compares two registers. It takes the branch if rs1 is less than rs2, using
Expand Down
2 changes: 1 addition & 1 deletion instruction/bltu.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// BLTU branch instruction compares two registers. It takes the branch if rs1 is less than rs2, using
Expand Down
2 changes: 1 addition & 1 deletion instruction/bne.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// BNE branch instruction compares two registers. It takes the branch if registers rs1 and rs2 are unequal.
Expand Down
4 changes: 2 additions & 2 deletions instruction/instruction.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"yars/bv"
"yars/intf"
"github.com/yqszxx/yars/bv"
"github.com/yqszxx/yars/intf"
)

type Instruction struct {
Expand Down
2 changes: 1 addition & 1 deletion instruction/jal.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// JAL (jump and link) uses the J-type format, where the J-immediate encodes a signed offset
Expand Down
2 changes: 1 addition & 1 deletion instruction/jalr.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// JALR (jump and link register) uses the I-type encoding. The target address is obtained
Expand Down
4 changes: 2 additions & 2 deletions instruction/lb.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"github.com/yqszxx/yars/intf"
"log"
"yars/bv"
"yars/intf"
)

// LB loads a 8-bit value from memory, then sign-extends to 32-bits before storing in rd.
Expand Down
4 changes: 2 additions & 2 deletions instruction/lbu.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"github.com/yqszxx/yars/intf"
"log"
"yars/bv"
"yars/intf"
)

// LB loads a 8-bit value from memory, then zero-extends to 32-bits before storing in rd.
Expand Down
4 changes: 2 additions & 2 deletions instruction/lh.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"github.com/yqszxx/yars/intf"
"log"
"yars/bv"
"yars/intf"
)

// LH loads a 16-bit value from memory, then sign-extends to 32-bits before storing in rd.
Expand Down
4 changes: 2 additions & 2 deletions instruction/lhu.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"github.com/yqszxx/yars/intf"
"log"
"yars/bv"
"yars/intf"
)

// LHU loads a 16-bit value from memory, then zero-extends to 32-bits before storing in rd.
Expand Down
2 changes: 1 addition & 1 deletion instruction/lui.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// LUI (load upper immediate) places the 20-bit U-immediate into bits 31–12 of register
Expand Down
4 changes: 2 additions & 2 deletions instruction/lw.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"github.com/yqszxx/yars/intf"
"log"
"yars/bv"
"yars/intf"
)

// LW loads a 32-bit value from memory, then sign-extends to 64-bits before storing in rd.
Expand Down
2 changes: 1 addition & 1 deletion instruction/or.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// OR performs bitwise OR logical operation.
Expand Down
2 changes: 1 addition & 1 deletion instruction/ori.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// ORI is a logical operation that performs bitwise OR on register rs1 and the sign-extended
Expand Down
4 changes: 2 additions & 2 deletions instruction/sb.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"github.com/yqszxx/yars/intf"
"log"
"yars/bv"
"yars/intf"
)

// The SB instruction stores 8-bit value from the low bits of register rs2 to memory.
Expand Down
4 changes: 2 additions & 2 deletions instruction/sh.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"github.com/yqszxx/yars/intf"
"log"
"yars/bv"
"yars/intf"
)

// The SH instruction stores 16-bit value from the low bits of register rs2 to memory.
Expand Down
2 changes: 1 addition & 1 deletion instruction/sll.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SLL performs logical left shift on the value in register rs1 by the shift amount held in register
Expand Down
2 changes: 1 addition & 1 deletion instruction/slli.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SLLI is a logical left shift (zeros are shifted into the lower bits). The operand to be shifted
Expand Down
2 changes: 1 addition & 1 deletion instruction/slt.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SLT (set less than) performs signed compare, writing 1 to rd if rs1 < rs2, 0 otherwise.
Expand Down
2 changes: 1 addition & 1 deletion instruction/slti.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SLTI (set less than immediate) places the value 1 in register rd if register rs1 is less than the
Expand Down
2 changes: 1 addition & 1 deletion instruction/sltiu.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SLTIU (set less than immediate unsigned) places the value 1 in register rd if register rs1 is less
Expand Down
2 changes: 1 addition & 1 deletion instruction/sltu.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SLTU (set less than) performs unsigned compare, writing 1 to rd if rs1 < rs2, 0 otherwise.
Expand Down
2 changes: 1 addition & 1 deletion instruction/sra.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SRA performs arithmetic right shift on the value in register rs1 by the shift amount held in
Expand Down
2 changes: 1 addition & 1 deletion instruction/srai.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SRAI is an arithmetic right shift (the original sign bit is copied into the vacated upper bits).
Expand Down
2 changes: 1 addition & 1 deletion instruction/srl.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SRL performs logical right shift on the value in register rs1 by the shift amount held in register
Expand Down
2 changes: 1 addition & 1 deletion instruction/srli.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SRLI is a logical right shift (zeros are shifted into the upper bits). The operand to be shifted
Expand Down
2 changes: 1 addition & 1 deletion instruction/sub.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// SUB performs subtraction. Overflows are ignored and the low 64 bits of results are written to
Expand Down
4 changes: 2 additions & 2 deletions instruction/sw.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"github.com/yqszxx/yars/intf"
"log"
"yars/bv"
"yars/intf"
)

// The SW instruction stores 32-bit value from the low bits of register rs2 to memory.
Expand Down
2 changes: 1 addition & 1 deletion instruction/xor.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// XOR performs bitwise XOR logical operation.
Expand Down
2 changes: 1 addition & 1 deletion instruction/xori.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/yqszxx/yars/bv"
"log"
"yars/bv"
)

// XORI is a logical operation that performs bitwise XOR on register rs1 and the sign-extended
Expand Down
Loading

0 comments on commit cc5e5ca

Please sign in to comment.