URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 207 |
Rev 345 |
.file "strcmp.S"
|
.file "strcmp.S"
|
|
|
.section .text
|
.section .text
|
|
|
.global _strcmp
|
.global _strcmp
|
.type _strcmp,@function
|
.type _strcmp,@function
|
_strcmp:
|
_strcmp:
|
mov #-1, r3 ; Strictly speaking this is incorrect, but I doubt if anyone will ever know.
|
mov #-1, r3 ; Strictly speaking this is incorrect, but I doubt if anyone will ever know.
|
scmpu ; Perform the string comparison
|
scmpu ; Perform the string comparison
|
bnc 1f ; If Carry is not set skip over
|
bnc 1f ; If Carry is not set skip over
|
scne.L r1 ; Set result based on Z flag
|
scne.L r1 ; Set result based on Z flag
|
rts ;
|
rts ;
|
1: ;
|
1: ;
|
mov #-1,r1 ; Carry not set, result should be negative
|
mov #-1,r1 ; Carry not set, result should be negative
|
rts ;
|
rts ;
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.