This repository was archived by the owner on Jan 25, 2022. It is now read-only.
File tree 1 file changed +7
-10
lines changed
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -917,9 +917,8 @@ uint32_t divu32(uint32_t a, uint32_t b)
917
917
{
918
918
if (b == 0 ) {
919
919
return -1 ;
920
- } else {
921
- return a / b ;
922
920
}
921
+ return a / b ;
923
922
}
924
923
925
924
int32_t rem32 (int32_t a , int32_t b )
@@ -928,18 +927,16 @@ int32_t rem32(int32_t a, int32_t b)
928
927
return a ;
929
928
} else if (a == ((int32_t ) 1 << (XLEN - 1 )) && b == -1 ) {
930
929
return 0 ;
931
- } else {
932
- return a % b ;
933
930
}
931
+ return a % b ;
934
932
}
935
933
936
934
uint32_t remu32 (uint32_t a , uint32_t b )
937
935
{
938
936
if (b == 0 ) {
939
937
return a ;
940
- } else {
941
- return a % b ;
942
938
}
939
+ return a % b ;
943
940
}
944
941
945
942
static uint32_t mulh32 (int32_t a , int32_t b )
@@ -1599,10 +1596,10 @@ void execute_instruction()
1599
1596
return ;
1600
1597
}
1601
1598
/*
1602
- compliance test specific: if bit 0 of gp (x3) is 0, it is a
1603
- syscall, otherwise it is the program end, with the exit code
1604
- in the bits 31:1
1605
- */
1599
+ * compliance test specific: if bit 0 of gp (x3) is 0, it is a
1600
+ * syscall, otherwise it is the program end, with the exit code
1601
+ * in the bits 31:1
1602
+ */
1606
1603
if (begin_signature ) {
1607
1604
if (reg [3 ] & 1 ) {
1608
1605
debug_out ("program end, result: %04x\n" , reg [3 ] >> 1 );
You can’t perform that action at this time.
0 commit comments