diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b0ddb151..f1af9cbdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## [3.6.7] - 2023-06-22 +- Specify new optional model macro RVMODEL_MTVEC_ALIGN to define new macro MTVEC_ALIGN in arch_test.h for issue #351 + ## [3.6.6] - 2023-06-17 - Removed stale zext.h-01.S test case superseded by zext.h_64-01.S diff --git a/riscv-test-suite/env/arch_test.h b/riscv-test-suite/env/arch_test.h index 57fbd0f19..331008800 100644 --- a/riscv-test-suite/env/arch_test.h +++ b/riscv-test-suite/env/arch_test.h @@ -121,6 +121,12 @@ #define SIGALIGN FREGWIDTH #endif +#ifndef RVMODEL_MTVEC_ALIGN + #define MTVEC_ALIGN 6 // ensure that a trampoline is on a typical cacheline boundary, just in case +#else + #define MTVEC_ALIGN RVMODEL_MTVEC_ALIGN //Let the model defined value be used for required trap handler alignment based on implemented MTVEC +#endif + //============================================================================== // this section has RV Arch Test Constants, mostly YAML based. // It ensures they're defined & defaulted if necessary) @@ -930,7 +936,7 @@ rvtest_\__MODE__\()prolog_done: .macro RVTEST_TRAP_HANDLER __MODE__ .option push .option rvc // temporarily allow compress to allow c.nop alignment -.align 6 // ensure that a trampoline is on a typical cacheline boundary, just in case +.align MTVEC_ALIGN .option pop /**********************************************************************/ @@ -1755,4 +1761,4 @@ rvtest_\__MODE__\()end: #endif #endif rvtest_data_end: -.endm \ No newline at end of file +.endm diff --git a/spec/TestFormatSpec.adoc b/spec/TestFormatSpec.adoc index 8f4dff862..0fb81eab0 100644 --- a/spec/TestFormatSpec.adoc +++ b/spec/TestFormatSpec.adoc @@ -53,6 +53,9 @@ This document has been created by the following people (in alphabetical order of |================================================================================ | _Revision_ | _Date_ | _Author_ | _Modification_ +| 1.2.9 Draft | 23 May 2023 | Vaibhav Jain | + * Added description for RVMODEL_MTVEC_ALIGN macro under - Optional, Model-defined Macros Section + | 1.2.8 Draft | 16 December 2022 | S Pawan Kumar | * Size constraint of signature region updated to multiple of 4. * Added section to describe CondStr of RVTEST_CASE macro. @@ -509,6 +512,13 @@ the test. - Currently the test forces an empty macro if a target does not declare this. Future tests may change this. + `RVMODEL_MTVEC_ALIGN`:: + - This macro is to specify an integer number for a ".align" assembler directive related to trap handler's + start address. This is based on alignment restriction, if any, as dictated by an implementation specific MTVEC. + - Currently the resulting default value for corresponding .align directive, if a target does not declare + this macro is 6. Thus resulting in ".align 6" as directive for trap handler start address, or a 64-byte + aligned location. Future tests may change this. + === Required labels The test must define a `rvtest_entry_point` label to indicate the location to be used by the linker