Skip to content

Commit

Permalink
[cases] replace the wrong usage of the "lw" with the "la"
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf committed Oct 23, 2024
1 parent bb493ae commit a8d1e0a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions tests/asm/memcpy/memcpy.S
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ test:

# fill 0x1001000 with 0x55 x 4096 bytes
# a0: void* dest, a1: int n, a2: size_t len
lw a0, test_src_start
la a0, test_src_start
li a1, 0x55
li a2, 0x1000
call memset
# copy 0x1001000 to 0x1000000 with 4096 bytes
# a0: void* dest, a1: void* src, a2: size_t n
lw a0, test_src_start
lw a1, test_dst_start
la a0, test_src_start
la a1, test_dst_start
li a2, 0x1000
call memcpy

Expand Down
16 changes: 8 additions & 8 deletions tests/asm/mmm/mmm.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
test:

# a0: uint32_t result, a1: uint32_t *a, a2: uint32_t *b, a3: uint32_t *p
lw a0, mmm_result
lw a1, mmm_a
lw a2, mmm_b
lw a3, mmm_p
la a0, mmm_result
la a1, mmm_a
la a2, mmm_b
la a3, mmm_p

# for (int i = 0; i < 16; i++) a[i] = b[i] = p[i] = i;
li a4, 0
Expand All @@ -32,10 +32,10 @@ test:
addi a3, a3, 4
bne a4, a5, .LBB0_1

lw a0, mmm_result
lw a1, mmm_a
lw a2, mmm_b
lw a3, mmm_p
la a0, mmm_result
la a1, mmm_a
la a2, mmm_b
la a3, mmm_p

# begin mmm main program

Expand Down
4 changes: 2 additions & 2 deletions tests/asm/strlen/strlen.S
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ test:

# fill 0x1000000 with 0x55 x 4096 bytes
# a0: void* dest, a1: int n, a2: size_t len
lw a0, test_str_start
la a0, test_str_start
li a1, 0x55
li a2, 0x1000
call memset
# Call strlen to calculate the length of the string starting at memory address 0x1000000
# a0: const char *str
lw a0, test_str_start
la a0, test_str_start
call strlen

lw ra, 0(sp)
Expand Down

0 comments on commit a8d1e0a

Please sign in to comment.