sifive / freedom-metal

Bare Metal Compatibility Library for the Freedom Platform
Other
154 stars 47 forks source link

Initialize V-extension CSRs #399

Closed nick-knight closed 3 years ago

nick-knight commented 3 years ago

When initializing the vector unit (when present), boot code should also initialize vstart, vxrm, and vxsat; see spec.

Closes #375, which concerns a particular problem that may arise when this is not done.

nick-knight commented 3 years ago

@paul-walmsley-sifive : good point, the assembler needs to know about the V-extension. This is a similar problem elsewhere in this file: for example, the use of fcsr a few lines up. Somehow that hasn't caused problems before. I'll add preprocessor guards to this shortly.