Avoid leaving junk in the top half of R0 on return.

This fixes port-arm/17440.
This commit is contained in:
bjh21 2002-07-01 19:07:18 +00:00
parent e9ae5a9bbd
commit 3763adaefd
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: byte_swap_2.S,v 1.1 2000/12/29 20:13:47 bjh21 Exp $ */
/* $NetBSD: byte_swap_2.S,v 1.2 2002/07/01 19:07:18 bjh21 Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -42,9 +42,9 @@ _ENTRY(_C_LABEL(__bswap16))
_ENTRY(_C_LABEL(ntohs))
_ENTRY(_C_LABEL(htons))
_PROF_PROLOGUE
and r1, r0, #0xFF00
mov r0, r0, lsl #8
orr r0, r0, r1, lsr #8
and r1, r0, #0xff
mov r0, r0, lsr #8
orr r0, r0, r1, lsl #8
#ifdef __APCS_26__
movs pc, lr
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: byte_swap_2.S,v 1.1 2000/12/29 20:51:57 bjh21 Exp $ */
/* $NetBSD: byte_swap_2.S,v 1.2 2002/07/01 19:07:19 bjh21 Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -42,9 +42,9 @@ _ENTRY(_C_LABEL(bswap16))
_ENTRY(_C_LABEL(ntohs))
_ENTRY(_C_LABEL(htons))
_PROF_PROLOGUE
and r1, r0, #0xFF00
mov r0, r0, lsl #8
orr r0, r0, r1, lsr #8
and r1, r0, #0xff
mov r0, r0, lsr #8
orr r0, r0, r1, lsl #8
#ifdef __APCS_26__
movs pc, lr
#else