Skip to content

Add more description for .option directive#68

Merged
kito-cheng merged 2 commits into
riscv-non-isa:masterfrom
kito-cheng:doc-option
Apr 15, 2022
Merged

Add more description for .option directive#68
kito-cheng merged 2 commits into
riscv-non-isa:masterfrom
kito-cheng:doc-option

Conversation

@kito-cheng

Copy link
Copy Markdown
Collaborator

No description provided.

@jim-wilson jim-wilson left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread riscv-asm.md Outdated
@kito-cheng

Copy link
Copy Markdown
Collaborator Author

Changes:

  • Apply Jim's suggestions

Comment thread riscv-asm.md Outdated
Comment thread riscv-asm.md Outdated
Comment thread riscv-asm.md Outdated
Comment thread riscv-asm.md Outdated
@kito-cheng

Copy link
Copy Markdown
Collaborator Author

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

@kito-cheng

Copy link
Copy Markdown
Collaborator Author

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

Comment thread 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
Copy Markdown
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?

Comment thread riscv-asm.md Outdated
Comment thread riscv-asm.md Outdated
.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
Copy Markdown
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
Copy Markdown
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.

Comment thread riscv-asm.md Outdated

#### `rvc`/`norvc`

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

Copy link
Copy Markdown
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
Copy Markdown
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?

Comment thread riscv-asm.md Outdated
@luismarques

Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Changes:

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

@kito-cheng

Copy link
Copy Markdown
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

asb commented Apr 14, 2022

Copy link
Copy Markdown
Contributor

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

No additional comments from me.

@luismarques

Copy link
Copy Markdown
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
Copy Markdown
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