[XTENSA] fix sources using deprecated assembler directive

The assembler directive '.begin literal' is deprecated in the newer
versions of the binutils (strncopy_user.S and strnlen_user.S).

Signed-off-by: Chris Zankel <chris@zankel.net>
This commit is contained in:
Chris Zankel 2007-05-31 17:44:31 -07:00
parent 4af410a868
commit a0bb46ba07
2 changed files with 34 additions and 32 deletions

View File

@ -25,18 +25,18 @@
/* /*
* char *__strncpy_user(char *dst, const char *src, size_t len) * char *__strncpy_user(char *dst, const char *src, size_t len)
*/ */
.text
.begin literal #ifdef __XTENSA_EB__
.align 4 # define MASK0 0xff000000
.Lmask0: # define MASK1 0x00ff0000
.byte 0xff, 0x00, 0x00, 0x00 # define MASK2 0x0000ff00
.Lmask1: # define MASK3 0x000000ff
.byte 0x00, 0xff, 0x00, 0x00 #else
.Lmask2: # define MASK0 0x000000ff
.byte 0x00, 0x00, 0xff, 0x00 # define MASK1 0x0000ff00
.Lmask3: # define MASK2 0x00ff0000
.byte 0x00, 0x00, 0x00, 0xff # define MASK3 0xff000000
.end literal #endif
# Register use # Register use
# a0/ return address # a0/ return address
@ -53,6 +53,7 @@
# a11/ dst # a11/ dst
# a12/ tmp # a12/ tmp
.text
.align 4 .align 4
.global __strncpy_user .global __strncpy_user
.type __strncpy_user,@function .type __strncpy_user,@function
@ -61,10 +62,10 @@ __strncpy_user:
# a2/ dst, a3/ src, a4/ len # a2/ dst, a3/ src, a4/ len
mov a11, a2 # leave dst in return value register mov a11, a2 # leave dst in return value register
beqz a4, .Lret # if len is zero beqz a4, .Lret # if len is zero
l32r a5, .Lmask0 # mask for byte 0 movi a5, MASK0 # mask for byte 0
l32r a6, .Lmask1 # mask for byte 1 movi a6, MASK1 # mask for byte 1
l32r a7, .Lmask2 # mask for byte 2 movi a7, MASK2 # mask for byte 2
l32r a8, .Lmask3 # mask for byte 3 movi a8, MASK3 # mask for byte 3
bbsi.l a3, 0, .Lsrc1mod2 # if only 8-bit aligned bbsi.l a3, 0, .Lsrc1mod2 # if only 8-bit aligned
bbsi.l a3, 1, .Lsrc2mod4 # if only 16-bit aligned bbsi.l a3, 1, .Lsrc2mod4 # if only 16-bit aligned
.Lsrcaligned: # return here when src is word-aligned .Lsrcaligned: # return here when src is word-aligned

View File

@ -24,18 +24,18 @@
/* /*
* size_t __strnlen_user(const char *s, size_t len) * size_t __strnlen_user(const char *s, size_t len)
*/ */
.text
.begin literal #ifdef __XTENSA_EB__
.align 4 # define MASK0 0xff000000
.Lmask0: # define MASK1 0x00ff0000
.byte 0xff, 0x00, 0x00, 0x00 # define MASK2 0x0000ff00
.Lmask1: # define MASK3 0x000000ff
.byte 0x00, 0xff, 0x00, 0x00 #else
.Lmask2: # define MASK0 0x000000ff
.byte 0x00, 0x00, 0xff, 0x00 # define MASK1 0x0000ff00
.Lmask3: # define MASK2 0x00ff0000
.byte 0x00, 0x00, 0x00, 0xff # define MASK3 0xff000000
.end literal #endif
# Register use: # Register use:
# a2/ src # a2/ src
@ -48,6 +48,7 @@
# a9/ tmp # a9/ tmp
# a10/ tmp # a10/ tmp
.text
.align 4 .align 4
.global __strnlen_user .global __strnlen_user
.type __strnlen_user,@function .type __strnlen_user,@function
@ -56,10 +57,10 @@ __strnlen_user:
# a2/ s, a3/ len # a2/ s, a3/ len
addi a4, a2, -4 # because we overincrement at the end; addi a4, a2, -4 # because we overincrement at the end;
# we compensate with load offsets of 4 # we compensate with load offsets of 4
l32r a5, .Lmask0 # mask for byte 0 movi a5, MASK0 # mask for byte 0
l32r a6, .Lmask1 # mask for byte 1 movi a6, MASK1 # mask for byte 1
l32r a7, .Lmask2 # mask for byte 2 movi a7, MASK2 # mask for byte 2
l32r a8, .Lmask3 # mask for byte 3 movi a8, MASK3 # mask for byte 3
bbsi.l a2, 0, .L1mod2 # if only 8-bit aligned bbsi.l a2, 0, .L1mod2 # if only 8-bit aligned
bbsi.l a2, 1, .L2mod4 # if only 16-bit aligned bbsi.l a2, 1, .L2mod4 # if only 16-bit aligned