/[avr-libc]/avr-libc/libc/pmstring/strcmp_P.S
ViewVC logotype

Diff of /avr-libc/libc/pmstring/strcmp_P.S

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by joerg_wunsch, Tue Sep 13 13:29:54 2005 UTC revision 1.5 by aesok, Tue Nov 8 16:19:51 2005 UTC
# Line 26  Line 26 
26    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27    POSSIBILITY OF SUCH DAMAGE. */    POSSIBILITY OF SUCH DAMAGE. */
28    
29    /* $Id$ */
30    
31  #include "macros.inc"  #include "macros.inc"
32    
33  #define s1_hi r25  #define s1_hi r25
# Line 52  Line 54 
54          .global _U(strcmp_P)          .global _U(strcmp_P)
55          .type   _U(strcmp_P), @function          .type   _U(strcmp_P), @function
56  _U(strcmp_P):  _U(strcmp_P):
57          LOAD_Z(s2_lo, s2_hi)          X_movw  ZL, s2_lo
58          LOAD_X(s1_lo, s1_hi)          X_movw  XL, s1_lo
59  .strcmp_P_loop:  .L_strcmp_P_loop:
60          ld      ret_lo, X+          ld      ret_lo, X+
61          LPM_R0_ZP          LPM_R0_ZP
62          sub     ret_lo, r0          sub     ret_lo, r0
63          brne    .strcmp_P_done          brne    .L_strcmp_P_done
64          tst     r0          tst     r0
65          brne    .strcmp_P_loop          brne    .L_strcmp_P_loop
66  .strcmp_P_done:  .L_strcmp_P_done:
67  ; ret_hi = SREG.C ? 0xFF : 0  ; ret_hi = SREG.C ? 0xFF : 0
68          sbc     ret_hi, ret_hi          sbc     ret_hi, ret_hi
69          ret          ret
70  .strcmp_P_end:  .L_strcmp_P_end:
71          .size   _U(strcmp_P), .strcmp_P_end - _U(strcmp_P)          .size   _U(strcmp_P), .L_strcmp_P_end - _U(strcmp_P)
72    
73  #endif /* not __DOXYGEN__ */  #endif /* not __DOXYGEN__ */

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26