riscv-non-isa / riscv-trace-spec

RISC-V Processor Trace Specification
https://jira.riscv.org/browse/RVG-88
Creative Commons Attribution 4.0 International
152 stars 47 forks source link

Should delta address field be added a sign bit at MSB? #136

Closed zhangdujiao closed 3 weeks ago

zhangdujiao commented 3 weeks ago

For 64 bits address, if the delta address is "0x0 - 0x4", how to express the result? Should a sign bit be added at MSB to show minus?

IainCRobertson commented 3 weeks ago

That's not necessary and there's nothing special about 64 bits. 0 - 4 = 0xffffffff fffffffc. If this is reported as the delta, and it is added to the base address (0) the result will be 0xffffffff fffffffc, which is the correct answer.

Iain

From: zhangdujiao @.> Sent: 19 August 2024 08:53 To: riscv-non-isa/riscv-trace-spec @.> Cc: Subscribed @.***> Subject: [riscv-non-isa/riscv-trace-spec] Should delta address field be added a sign bit at MSB? (Issue #136)

For 64 bits address, if the delta address is "0x0 - 0x4", how to express the result? Should a sign bit be added at MSB to show minus?

- Reply to this email directly, view it on GitHubhttps://github.com/riscv-non-isa/riscv-trace-spec/issues/136, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQOPSTEGBSMJOYXYEVE6YDZSGP5NAVCNFSM6AAAAABMXI4KVWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3TENRZGU4TOMA. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>