Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

release / daiteq-binutils

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • daiteq-binutils
  • tests
  • riscv
  • test_swar.s
  • Martin's avatar
    Release 2022.1 · 54f37362
    Martin committed Aug 31, 2022
    54f37362
test_swar.s 430 Bytes
BlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
# test all added instructions for SWAR extension

.section .text
.global test_swar

test_swar:
    swar        t0, t1, t2

    csrw   swarctrlstat, t0
    csrwi  swarctrlstat, 0x1
    csrr   t1, swarctrlstat

    csrwi  swaracc, 0
    csrr   t1, swaracc
    csrwi  swaracc, 1
    csrr   t2, swaracc
    csrw   swaracc, t0
    csrr   t3, swaracc

.section .rodata
swar_a:
    .word  0x12345678

.section .data
swar_y:
    .word  0