Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

誤記報告:P333のLLVMをコンパイルしてテストするについて #13

Closed
tichkr opened this issue Aug 14, 2022 · 2 comments
Closed

Comments

@tichkr
Copy link

tichkr commented Aug 14, 2022

P333の「■LLVMをコンパイルしてテストする」冒頭で、staticポリシかつmedlowコードモデルの場合についてのオブジェクトファイルを生成して確認する箇所の結果が、staticポリシかつmedanyコードモデルのものになっており、その結果に対する説明もstaticポリシかつmedanyコードモデルのものになっています。
書籍の手順通りにオブジェクトファイルを生成した時の結果は以下のようなりました。

0000000000000000 <update_global>:
   0:   00000537                lui     a0,0x0
                        0: R_RISCV_HI20 global_val
                        0: R_RISCV_RELAX        *ABS*
   4:   00050513                mv      a0,a0
                        4: R_RISCV_LO12_I       global_val
                        4: R_RISCV_RELAX        *ABS*
   8:   00052583                lw      a1,0(a0) # 0 <update_global>
   c:   00158593                addi    a1,a1,1
  10:   00b52023                sw      a1,0(a0)
  14:   00008067                ret
@msyksphinz-self
Copy link
Owner

ありがとうございます。こちらでも確認して、ご指摘のものと一致いたしました。
正誤表に追記しました。

@tichkr
Copy link
Author

tichkr commented Aug 14, 2022

ご対応ありがとうございます。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants