@ -54,7 +54,7 @@ vRegTest1Implementation:
li x12 , 0 x c
li x12 , 0 x c
li x13 , 0 x d
li x13 , 0 x d
li x14 , 0 x e
li x14 , 0 x e
li x15 , 0 x f
# ifndef _ _ r i s c v _ 3 2 e
li x16 , 0 x10
li x16 , 0 x10
li x17 , 0 x11
li x17 , 0 x11
li x18 , 0 x12
li x18 , 0 x12
@ -70,73 +70,77 @@ vRegTest1Implementation:
li x28 , 0 x1 c
li x28 , 0 x1 c
li x29 , 0 x1 d
li x29 , 0 x1 d
li x30 , 0 x1 e
li x30 , 0 x1 e
li x31 , 0 x1 f
# endif
reg1_loop :
reg1_loop :
/ * Check e a c h r e g i s t e r s t i l l c o n t a i n s t h e e x p e c t e d k n o w n v a l u e .
/ * Check e a c h r e g i s t e r s t i l l c o n t a i n s t h e e x p e c t e d k n o w n v a l u e .
* vRegTest1 I m p l e m e n t a t i o n u s e s x 3 1 a s t h e t e m p o r a r y , v R e g T e s t 2 I m p l e m e n t a t i o n
* vRegTest1 I m p l e m e n t a t i o n u s e s x 15 a s t h e t e m p o r a r y , v R e g T e s t 2 I m p l e m e n t a t i o n
* uses x5 a s t h e t e m p o r a r y . * /
* uses x5 a s t h e t e m p o r a r y . * /
li x31 , 0 x5
li x15 , 0 x5
bne x31 , x5 , r e g 1 _ e r r o r _ l o o p
bne x15 , x5 , r e g 1 _ e r r o r _ l o o p
li x31 , 0 x6
li x15 , 0 x6
bne x31 , x6 , r e g 1 _ e r r o r _ l o o p
bne x15 , x6 , r e g 1 _ e r r o r _ l o o p
li x31 , 0 x7
li x15 , 0 x7
bne x31 , x7 , r e g 1 _ e r r o r _ l o o p
bne x15 , x7 , r e g 1 _ e r r o r _ l o o p
li x31 , 0 x8
li x15 , 0 x8
bne x31 , x8 , r e g 1 _ e r r o r _ l o o p
bne x15 , x8 , r e g 1 _ e r r o r _ l o o p
li x31 , 0 x9
li x15 , 0 x9
bne x31 , x9 , r e g 1 _ e r r o r _ l o o p
bne x15 , x9 , r e g 1 _ e r r o r _ l o o p
li x31 , 0 x a
li x15 , 0 x a
bne x31 , x10 , r e g 1 _ e r r o r _ l o o p
bne x15 , x10 , r e g 1 _ e r r o r _ l o o p
li x31 , 0 x b
li x15 , 0 x b
bne x31 , x11 , r e g 1 _ e r r o r _ l o o p
bne x15 , x11 , r e g 1 _ e r r o r _ l o o p
li x31 , 0 x c
li x15 , 0 x c
bne x31 , x12 , r e g 1 _ e r r o r _ l o o p
bne x15 , x12 , r e g 1 _ e r r o r _ l o o p
li x31 , 0 x d
li x15 , 0 x d
bne x31 , x13 , r e g 1 _ e r r o r _ l o o p
bne x15 , x13 , r e g 1 _ e r r o r _ l o o p
li x31 , 0 x e
li x15 , 0 x e
bne x31 , x14 , r e g 1 _ e r r o r _ l o o p
bne x15 , x14 , r e g 1 _ e r r o r _ l o o p
li x31 , 0 x f
# ifndef _ _ r i s c v _ 3 2 e
bne x31 , x15 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x10
li x31 , 0 x10
bne x15 , x16 , r e g 1 _ e r r o r _ l o o p
bne x31 , x16 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x11
li x31 , 0 x11
bne x15 , x17 , r e g 1 _ e r r o r _ l o o p
bne x31 , x17 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x12
li x31 , 0 x12
bne x15 , x18 , r e g 1 _ e r r o r _ l o o p
bne x31 , x18 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x13
li x31 , 0 x13
bne x15 , x19 , r e g 1 _ e r r o r _ l o o p
bne x31 , x19 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x14
li x31 , 0 x14
bne x15 , x20 , r e g 1 _ e r r o r _ l o o p
bne x31 , x20 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x15
li x31 , 0 x15
bne x15 , x21 , r e g 1 _ e r r o r _ l o o p
bne x31 , x21 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x16
li x31 , 0 x16
bne x15 , x22 , r e g 1 _ e r r o r _ l o o p
bne x31 , x22 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x17
li x31 , 0 x17
bne x15 , x23 , r e g 1 _ e r r o r _ l o o p
bne x31 , x23 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x18
li x31 , 0 x18
bne x15 , x24 , r e g 1 _ e r r o r _ l o o p
bne x31 , x24 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x19
li x31 , 0 x19
bne x15 , x25 , r e g 1 _ e r r o r _ l o o p
bne x31 , x25 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x1 a
li x31 , 0 x1 a
bne x15 , x26 , r e g 1 _ e r r o r _ l o o p
bne x31 , x26 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x1 b
li x31 , 0 x1 b
bne x15 , x27 , r e g 1 _ e r r o r _ l o o p
bne x31 , x27 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x1 c
li x31 , 0 x1 c
bne x15 , x28 , r e g 1 _ e r r o r _ l o o p
bne x31 , x28 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x1 d
li x31 , 0 x1 d
bne x15 , x29 , r e g 1 _ e r r o r _ l o o p
bne x31 , x29 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x1 e
li x31 , 0 x1 e
bne x15 , x30 , r e g 1 _ e r r o r _ l o o p
bne x31 , x30 , r e g 1 _ e r r o r _ l o o p
li x15 , 0 x1 f
bne x15 , x31 , r e g 1 _ e r r o r _ l o o p
# endif
/* Everything passed, increment the loop counter. */
/* Everything passed, increment the loop counter. */
lw x 3 1, p u l R e g T e s t 1 L o o p C o u n t e r
lw x 15 , p u l R e g T e s t 1 L o o p C o u n t e r
lw x 30, 0 ( x31 )
lw x 14, 0 ( x15 )
addi x 30, x30 , 1
addi x 14, x14 , 1
sw x 30, 0 ( x31 )
sw x 14, 0 ( x15 )
/* Restore clobbered register reading for next loop. */
/* Restore clobbered register reading for next loop. */
li x 30, 0 x1 e
li x 14, 0 x e
/* Yield to increase code coverage. */
/* Yield to increase code coverage. */
ecall
ecall
@ -145,9 +149,7 @@ reg1_loop:
jal r e g 1 _ l o o p
jal r e g 1 _ l o o p
reg1_error_loop :
reg1_error_loop :
/ * Jump h e r e i f a r e g i s t e r c o n t a i n s a n u x p e c t e d v a l u e . T h i s s t o p s t h e l o o p
/* Busy loop which holds the task. */
* counter b e i n g i n c r e m e n t e d s o t h e c h e c k t a s k k n o w s a n e r r o r w a s f o u n d . * /
ebreak
jal r e g 1 _ e r r o r _ l o o p
jal r e g 1 _ e r r o r _ l o o p
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/
@ -166,6 +168,7 @@ vRegTest2Implementation:
li x13 , 0 x d1
li x13 , 0 x d1
li x14 , 0 x e 1
li x14 , 0 x e 1
li x15 , 0 x f1
li x15 , 0 x f1
# ifndef _ _ r i s c v _ 3 2 e
li x16 , 0 x20
li x16 , 0 x20
li x17 , 0 x21
li x17 , 0 x21
li x18 , 0 x22
li x18 , 0 x22
@ -182,12 +185,13 @@ vRegTest2Implementation:
li x29 , 0 x2 d
li x29 , 0 x2 d
li x30 , 0 x2 e
li x30 , 0 x2 e
li x31 , 0 x2 f
li x31 , 0 x2 f
# endif
Reg2_loop :
Reg2_loop :
/ * Check e a c h r e g i s t e r s t i l l c o n t a i n s t h e e x p e c t e d k n o w n v a l u e .
/ * Check e a c h r e g i s t e r s t i l l c o n t a i n s t h e e x p e c t e d k n o w n v a l u e .
* vRegTest2 I m p l e m e n t a t i o n u s e s x5 a s t h e t e m p o r a r y , v R e g T e s t 1 I m p l e m e n t a t i o n
* vRegTest2 I m p l e m e n t a t i o n u s e s x5 a s t h e t e m p o r a r y , v R e g T e s t 1 I m p l e m e n t a t i o n
* uses x 3 1 a s t h e t e m p o r a r y . * /
* uses x 15 a s t h e t e m p o r a r y . * /
li x5 , 0 x61
li x5 , 0 x61
bne x5 , x6 , r e g 2 _ e r r o r _ l o o p
bne x5 , x6 , r e g 2 _ e r r o r _ l o o p
li x5 , 0 x71
li x5 , 0 x71
@ -208,6 +212,7 @@ Reg2_loop:
bne x5 , x14 , r e g 2 _ e r r o r _ l o o p
bne x5 , x14 , r e g 2 _ e r r o r _ l o o p
li x5 , 0 x f1
li x5 , 0 x f1
bne x5 , x15 , r e g 2 _ e r r o r _ l o o p
bne x5 , x15 , r e g 2 _ e r r o r _ l o o p
# ifndef _ _ r i s c v _ 3 2 e
li x5 , 0 x20
li x5 , 0 x20
bne x5 , x16 , r e g 2 _ e r r o r _ l o o p
bne x5 , x16 , r e g 2 _ e r r o r _ l o o p
li x5 , 0 x21
li x5 , 0 x21
@ -240,6 +245,7 @@ Reg2_loop:
bne x5 , x30 , r e g 2 _ e r r o r _ l o o p
bne x5 , x30 , r e g 2 _ e r r o r _ l o o p
li x5 , 0 x2 f
li x5 , 0 x2 f
bne x5 , x31 , r e g 2 _ e r r o r _ l o o p
bne x5 , x31 , r e g 2 _ e r r o r _ l o o p
# endif
/* Everything passed, increment the loop counter. */
/* Everything passed, increment the loop counter. */
lw x5 , p u l R e g T e s t 2 L o o p C o u n t e r
lw x5 , p u l R e g T e s t 2 L o o p C o u n t e r
@ -254,9 +260,7 @@ Reg2_loop:
jal R e g 2 _ l o o p
jal R e g 2 _ l o o p
reg2_error_loop :
reg2_error_loop :
/ * Jump h e r e i f a r e g i s t e r c o n t a i n s a n u x p e c t e d v a l u e . T h i s s t o p s t h e l o o p
/* Busy loop which holds the task. */
* counter b e i n g i n c r e m e n t e d s o t h e c h e c k t a s k k n o w s a n e r r o r w a s f o u n d . * /
ebreak
jal r e g 2 _ e r r o r _ l o o p
jal r e g 2 _ e r r o r _ l o o p
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/