strlen.S (98e0ffaefb0f241cda3a72395d3be04192ae0d47) strlen.S (6c5bc49c5a803101b52861068594eacf6775e08c)
1/*-
2 * Copyright (c) 2005 Olivier Houchard
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 38 unchanged lines hidden (view full) ---

47.Loop:
48 ldr r2, [r0]
49 add r0, r0, #4
50#ifndef __ARMEB__
51 ands r3, r2, #0x000000ff
52#else
53 ands r3, r2, #0xff000000
54#endif
1/*-
2 * Copyright (c) 2005 Olivier Houchard
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 38 unchanged lines hidden (view full) ---

47.Loop:
48 ldr r2, [r0]
49 add r0, r0, #4
50#ifndef __ARMEB__
51 ands r3, r2, #0x000000ff
52#else
53 ands r3, r2, #0xff000000
54#endif
55 it ne
55 addne r1, r1, #1
56.Ldo_3:
56 addne r1, r1, #1
57.Ldo_3:
58 itt ne
57#ifndef __ARMEB__
58 andsne r3, r2, #0x0000ff00
59#else
60 andsne r3, r2, #0x00ff0000
61#endif
62 addne r1, r1, #1
63.Ldo_2:
59#ifndef __ARMEB__
60 andsne r3, r2, #0x0000ff00
61#else
62 andsne r3, r2, #0x00ff0000
63#endif
64 addne r1, r1, #1
65.Ldo_2:
66 itt ne
64#ifndef __ARMEB__
65 andsne r3, r2, #0x00ff0000
66#else
67 andsne r3, r2, #0x0000ff00
68#endif
69 addne r1, r1, #1
70.Ldo_1:
67#ifndef __ARMEB__
68 andsne r3, r2, #0x00ff0000
69#else
70 andsne r3, r2, #0x0000ff00
71#endif
72 addne r1, r1, #1
73.Ldo_1:
74 ittt ne
71#ifndef __ARMEB__
72 andsne r3, r2, #0xff000000
73#else
74 andsne r3, r2, #0x000000ff
75#endif
76 addne r1, r1, #1
77 bne .Loop
78.Lexit:
79 mov r0, r1
80 RET
81END(strlen)
75#ifndef __ARMEB__
76 andsne r3, r2, #0xff000000
77#else
78 andsne r3, r2, #0x000000ff
79#endif
80 addne r1, r1, #1
81 bne .Loop
82.Lexit:
83 mov r0, r1
84 RET
85END(strlen)