c - 将 C 语言翻译成汇编语言

标签 c assembly mips

在我的类(class)笔记中,我得到了以下信息:

C:

thisthread.id = 4711;

汇编程序:

.text
.align 2
movia r8,thisthread
movi r9,4711
stw r9,4(r8) # id after sp that takes 4 bytes

但是 sp 不是需要 4 位吗?我认为偏移量是以位为单位指定的,而不是以字节为单位。我错了吗?

最佳答案

你错了。偏移量确实以字节为单位。

关于c - 将 C 语言翻译成汇编语言,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12257572/

相关文章:

c++ - 通过 C++ 软件上的 C 接口(interface)传递/接收字符串

c - C 中的 fork() 流程

c - Sublime Text在Windows中编译多个文件

c - 将汇编语言转换为C语言代码

assembly - MIPS 程序 jr $ra 指令和堆栈处理

c - KDevelop 无法在 ubuntu 中调试?

c++ - MASM str 和 substr?

.net - 省电 SpinWait

MIPS 流水线中的低延迟

assembly - Mips:计算两个输入的总和