1129202Scognet/* $NetBSD: strcmp.S,v 1.3 2003/04/05 23:08:52 bjh21 Exp $ */ 2129202Scognet 3129202Scognet/* 4129202Scognet * Copyright (c) 2002 ARM Ltd 5129202Scognet * All rights reserved. 6129202Scognet * 7129202Scognet * Redistribution and use in source and binary forms, with or without 8129202Scognet * modification, are permitted provided that the following conditions 9129202Scognet * are met: 10129202Scognet * 1. Redistributions of source code must retain the above copyright 11129202Scognet * notice, this list of conditions and the following disclaimer. 12129202Scognet * 2. Redistributions in binary form must reproduce the above copyright 13129202Scognet * notice, this list of conditions and the following disclaimer in the 14129202Scognet * documentation and/or other materials provided with the distribution. 15129202Scognet * 3. The name of the company may not be used to endorse or promote 16129202Scognet * products derived from this software without specific prior written 17129202Scognet * permission. 18129202Scognet * 19129202Scognet * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED 20129202Scognet * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21129202Scognet * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22129202Scognet * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23129202Scognet * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 24129202Scognet * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25129202Scognet * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26129202Scognet * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27129202Scognet * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28129202Scognet * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29129202Scognet */ 30129202Scognet 31129202Scognet#include <machine/asm.h> 32129202Scognet 33129202Scognet__FBSDID("$FreeBSD$"); 34129202Scognet 35129202ScognetENTRY(strcmp) 36129202Scognet1: 37129202Scognet ldrb r2, [r0], #1 38129202Scognet ldrb r3, [r1], #1 39129202Scognet cmp r2, #1 40129202Scognet cmpcs r2, r3 41129202Scognet beq 1b 42129202Scognet sub r0, r2, r3 43137464Scognet RET 44