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

Annotate LA32R instructions #5

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Annotate LA32R instructions #5

wants to merge 1 commit into from

Conversation

FlyGoat
Copy link
Member

@FlyGoat FlyGoat commented Dec 23, 2024

Annotate LA32R instructions based on 《龙芯架构 32 位精简版参考手册 V1.03》. LA32 FPU instructions are handled as well.

For the LA32 FPU, we need some further feature set clarification.

To quote《龙芯架构参考手册 卷一:基础架构 V1.10》: "但是 FSCALEB.S/D、FLOGB.S/D、FRINT.S/D、FRECIPE.S/D 和 FRSQRTE.S/D 这 10 条指令仅需在 LA64 架构下实现。"

  • There are more Instructions that cannot be implemented in 32-bit mode: movgr2fr.d, movfr2gr.d, what's the expected behaviour?

  • Need confirmation on whether LA32 should include these instructions missing from LA32R: FTINT{RM/RP/RZ/RNE}.L.{S/D}.

Signed-off-by: Jiaxun Yang <[email protected]>
@jiegec
Copy link
Contributor

jiegec commented Dec 31, 2024

* There are more Instructions that cannot be implemented in 32-bit mode: `movgr2fr.d`, `movfr2gr.d`, what's the expected behaviour?

It also says: 实现基础浮点数指令时是否包含操作数双精度浮点数和双字整数的指令的架构是 LA32 还是 LA64 无关, I think it means that even in LA32, the instructions for double word (64-bit) move are implemented if 64-bit FPU is implemented. But the behavior is not specified for movgr2fr.d, e.g. sign extension or zero extension.

@FlyGoat
Copy link
Member Author

FlyGoat commented Dec 31, 2024

* There are more Instructions that cannot be implemented in 32-bit mode: `movgr2fr.d`, `movfr2gr.d`, what's the expected behaviour?

It also says: 实现基础浮点数指令时是否包含操作数双精度浮点数和双字整数的指令的架构是 LA32 还是 LA64 无关, I think it means that even in LA32, the instructions for double word (64-bit) move are implemented if 64-bit FPU is implemented. But the behavior is not specified for movgr2fr.d, e.g. sign extension or zero extension.

IMO it doesn't make much sense to implement those instructions this way. Better consulting Loongson folks.

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.

2 participants