Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add more description for .option directive #68

Merged
merged 2 commits into from
Apr 15, 2022

Conversation

kito-cheng
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@jim-wilson jim-wilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some linkers don't support relaxation, but that probably doesn't need to be explained here. if it does, then maybe something like "if the linker supports it" added to the relax explanation would be good enough.

riscv-asm.md Outdated Show resolved Hide resolved
@kito-cheng
Copy link
Collaborator Author

Changes:

  • Apply Jim's suggestions

riscv-asm.md Outdated Show resolved Hide resolved
riscv-asm.md Outdated Show resolved Hide resolved
riscv-asm.md Outdated Show resolved Hide resolved
riscv-asm.md Outdated Show resolved Hide resolved
@kito-cheng
Copy link
Collaborator Author

@jrtc27 does this change look good to you after apply your revision?

@kito-cheng
Copy link
Collaborator Author

@luismarques @asb @jrtc27 did you mind did a final round review?

riscv-asm.md Outdated
Comment on lines 199 to 200
Enable/disable linker relaxation for the following code region if the linker
supports it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"if the linker supports it" -> I think this enables it unconditionally, no? At least Clang will just enable it, and if the linker doesn't support it (LLD...) then it craps out.

I don't know if it's worth mentioning that this also includes emission ofR_RISCV_ALIGN relocations?

riscv-asm.md Outdated Show resolved Hide resolved
riscv-asm.md Outdated
@@ -164,7 +164,7 @@ Directive | Arguments | Description
.macro | name arg1 [, argn] | begin macro definition \argname to substitute
.endm | | end macro definition
.type | symbol, @function | accepted for source compatibility
.option | {rvc,norvc,pic,nopic,push,pop} | RISC-V options
.option | {rvc,norvc,pic,nopic,relax,norelax,push,pop} | RISC-V options, more detailed description in [.option](#.option).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reformat table, to realign the |s?

Nit: "RISC-V options. Refer to .option for a more detailed description."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer don't realign this time since we might need to realign for .option arch, soon, my thought is we can did that when converting the format to AsciiDoc.

riscv-asm.md Outdated

#### `rvc`/`norvc`

Enable/disable C-extension for the following code region.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"C-extension" -> "The C extension"

I don't know if the word "region" in "the following code region" kind of implies that this has limited scope, like an #if ... #endif region. I'll let the native speakers nitpick that :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aswaterman did you having some suggestion on the wording about region?

riscv-asm.md Outdated Show resolved Hide resolved
@luismarques
Copy link
Contributor

Some linkers don't support relaxation, but that probably doesn't need to be explained here. if it does, then maybe something like "if the linker supports it" added to the relax explanation would be good enough.

I hadn't noticed your earlier comment, Jim. I think that phrasing ends up being misleading. When using this option the compiler will emit relaxation relocations without checking for linker support, and then the linker will complain if it doesn't actually support such relaxations. Maybe just state that the linker needs to support relaxations?

@kito-cheng kito-cheng force-pushed the doc-option branch 2 times, most recently from fdd4fcf to 27515d2 Compare April 8, 2022 08:06
@kito-cheng
Copy link
Collaborator Author

Changes:

  • Rebase
  • Address @luismarques's comment
  • Add NOTE to .option relax/.option norelax

@kito-cheng
Copy link
Collaborator Author

Changes:

  • Add one more NOTE to recommend user should use .option push + .option norelax + .option pop if they want to disable linker relaxation of specific code region

@asb
Copy link
Contributor

asb commented Apr 14, 2022

@luismarques @asb @jrtc27 did you mind did a final round review?

No additional comments from me.

@luismarques
Copy link
Contributor

I don't think I have permission in this repo/org to approve anything, but the technical issues I pointed out seem to have been addressed, so it LGTM.

@kito-cheng
Copy link
Collaborator Author

@luismarques @asb thanks you guys, I gonna merge this :)

@kito-cheng kito-cheng merged commit a9945e1 into riscv-non-isa:master Apr 15, 2022
@kito-cheng kito-cheng deleted the doc-option branch April 15, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants