Skip to content

Commit

Permalink
Merge pull request #284 from ericlove/enable-vector-isa
Browse files Browse the repository at this point in the history
Enable vector unit
  • Loading branch information
bsousi5 authored Jul 20, 2020
2 parents 1db2ff1 + 68bf919 commit 123e6f5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gloss/crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ _skip_init:
csrwi fcsr, 0
1:

/* Check for vector extension support and enable it if found */
csrr a5, misa
li a4, 0x200000
and a5, a5, a4
beqz a5, 1f
csrr a5, mstatus
ori a5, a5, 0x200
csrw mstatus, a5
1:

/* This is a C runtime, so main() is defined to have some arguments. Since
* there's nothing sane the METAL can pass we don't bother with that but
* instead just setup as close to a NOP as we can. */
Expand Down

0 comments on commit 123e6f5

Please sign in to comment.