-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: Kernelpriority: highHigh impact/importance bugHigh impact/importance bug
Milestone
Description
Reported by Andrew Boie:
Nios II CPUs may not implement the "mul", "div", or "mulx" families of instructions, if these are encountered the CPU will generate an exception. Modify the kernel so that this kind of math can still be done in an optimal way.
Two choices on the table:
- Somehow pull in system.h definitions into the Make environment (there are defines indicating which, if any, of the math instructions are unimplemented), and conditionally set appropriate CFLAGS so that GCC knows to use integer library routines instead of emitting unimplemented instructions.
- Enable all the math instructions in GCC and pull in alt_exception_muldiv.S from the Altera HAL to handle this stuff at runtime.
My inclination is for #1 but checking with Altera for a recommendation.
(Imported from Jira ZEP-489)
Metadata
Metadata
Assignees
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: Kernelpriority: highHigh impact/importance bugHigh impact/importance bug