aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/riscv/m-ext.s
blob: 4247156bea47f61c21ad8f06b4db44156ddaca10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Check that the RV32M instructions run without any faults.
# mach: riscv32 riscv64

.include "testutils.inc"

	start

	.option	arch, +m
	mul	x0, x1, x2
	mulh	x0, x1, x2
	mulhu	x0, x1, x2
	mulhsu	x0, x1, x2
	div	x0, x1, x2
	divu	x0, x1, x2
	rem	x0, x1, x2
	remu	x0, x1, x2

	pass