# Why Go use JMP instead J for RISC-V?

**URL:** <https://forum.golangbridge.org/t/why-go-use-jmp-instead-j-for-risc-v/23801>\
**Category:** Technical Discussion\
**Created:** [June 14, 2021, 4:35pm UTC](https://forum.golangbridge.org/t/why-go-use-jmp-instead-j-for-risc-v/23801 "2021-06-14T16:35:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santiago](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/santiago/32/9747_2.png) [@Santiago](https://forum.golangbridge.org/u/Santiago)\
**Post date:** [June 14, 2021, 4:35pm UTC](https://forum.golangbridge.org/t/why-go-use-jmp-instead-j-for-risc-v/23801/1 "2021-06-14T16:35:17Z")

</div>

I noted that Go use JMP for unconditional jump for RISC-V, when should be J.

JMP doesn’t exists in that arch, so I want to know if exists a file with alias for instructions by arch or is a mistake.

Example file: [https://github.com/golang/go/blob/release-branch.go1.16/src/math/big/arith\_riscv64.s](https://github.com/golang/go/blob/release-branch.go1.16/src/math/big/arith_riscv64.s)

Thanks.

---

<div class="post-metadata">

**Author:** ![skillian](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/skillian/32/7876_2.png) [@skillian](https://forum.golangbridge.org/u/skillian)\
**Post date:** [June 14, 2021, 8:49pm UTC](https://forum.golangbridge.org/t/why-go-use-jmp-instead-j-for-risc-v/23801/2 "2021-06-14T20:49:45Z")

</div>

Please see: [https://golang.org/doc/asm](https://golang.org/doc/asm)

Go uses its own standardized pseudo-assembly language across all platforms and the “instructions” don’t always map to actual hardware instructions for all platforms. Unlike other assemblers that map assembly mnemonics almost exactly to specific instructions, the Go assembler is “smart” and translates the pseudo-assembly to real assembly for the real hardware.

**EDIT:** This is also a useful link: [https://www.youtube.com/watch?v=KINIAgRpkDA](https://www.youtube.com/watch?v=KINIAgRpkDA)

---

<div class="post-metadata">

**Author:** ![Santiago](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/santiago/32/9747_2.png) [@Santiago](https://forum.golangbridge.org/u/Santiago)\
**Post date:** [June 14, 2021, 9:18pm UTC](https://forum.golangbridge.org/t/why-go-use-jmp-instead-j-for-risc-v/23801/3 "2021-06-14T21:18:37Z")

</div>

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![system](https://forum.golangbridge.org/uploads/default/original/2X/5/5ad234f7c3dbc68b6cc72d338ce4f2973d9fd81c.png) [@system](https://forum.golangbridge.org/u/system)\
**Post date:** [September 12, 2021, 9:18pm UTC](https://forum.golangbridge.org/t/why-go-use-jmp-instead-j-for-risc-v/23801/4 "2021-09-12T21:18:38Z")

</div>

Closed on September 12, 2021, 9:18pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
