vscode-riscv-venus icon indicating copy to clipboard operation
vscode-riscv-venus copied to clipboard

"unexpected align in text segment" error

Open dahyun-neubla opened this issue 8 months ago • 1 comments

Hi I am trying to run this piece of code on VS code. It runs fine on venus web(https://thaumicmekanism.github.io/venus/). Unfortunately it doesn't work on vs code. Seems like it works fine when ".align 2" is removed. But isn't align allowed in text?

  • Assembly code .text .align 2 .globl main

main: lui t0, 1 # t0 points to 0x1000 lw t1, 0(t0) # Load a into t1 lw t2, 4(t0) # Load b into t2 add t3, t1, t2 # t3 <- t1 + t2 sw t3, 8(t0) # Store t3 into c

  • Error message
AssemblerError: start.s:2: unexpected align in text segment
.align 2

Stop program execution!

===== VS code info===== Version: 1.90.2 (user setup) Commit: 5437499feb04f7a586f677b155b039bc2b3669eb Date: 2024-06-18T22:34:26.404Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.19045

dahyun-neubla avatar Jun 20 '24 13:06 dahyun-neubla