Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3177b564
Commit
3177b564
authored
Jan 15, 2004
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: If GAS can handle .align inside code, enable it via TEXT_ALIGN().
parent
65e199f9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
120 deletions
+27
-120
arch/ia64/Makefile
arch/ia64/Makefile
+3
-4
arch/ia64/lib/memcpy_mck.S
arch/ia64/lib/memcpy_mck.S
+3
-3
arch/ia64/lib/memset.S
arch/ia64/lib/memset.S
+3
-3
arch/ia64/scripts/check-text-align.S
arch/ia64/scripts/check-text-align.S
+6
-0
arch/ia64/scripts/unwcheck.sh
arch/ia64/scripts/unwcheck.sh
+0
-109
include/asm-ia64/asmmacro.h
include/asm-ia64/asmmacro.h
+12
-1
No files found.
arch/ia64/Makefile
View file @
3177b564
...
...
@@ -5,7 +5,7 @@
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1998-200
3
by David Mosberger-Tang <davidm@hpl.hp.com>
# Copyright (C) 1998-200
4
by David Mosberger-Tang <davidm@hpl.hp.com>
#
NM
:=
$(CROSS_COMPILE)
nm
-B
...
...
@@ -26,9 +26,8 @@ CFLAGS_KERNEL := -mconstant-gp
GCC_VERSION
=
$(
shell
$(CC)
-v
2>&1 | fgrep
'gcc version'
|
cut
-f3
-d
' '
|
cut
-f1
-d
'.'
)
GCC_MINOR_VERSION
=
$(
shell
$(CC)
-v
2>&1 | fgrep
'gcc version'
|
cut
-f3
-d
' '
|
cut
-f2
-d
'.'
)
GAS_STATUS
=
$(
shell
$(srctree)
/arch/ia64/scripts/check-gas
$(CC)
$(OBJDUMP)
)
CPPFLAGS
+=
$(
shell
$(srctree)
/arch/ia64/scripts/toolchain-flags
$(CC)
$(OBJDUMP)
)
GAS_STATUS
=
$(
shell
$(srctree)
/arch/ia64/scripts/check-gas
$(CC)
$(OBJDUMP)
)
CPPFLAGS
+=
$(
shell
$(srctree)
/arch/ia64/scripts/toolchain-flags
$(CC)
$(OBJDUMP)
$(READELF)
)
ifeq
($(GAS_STATUS),buggy)
$(error
Sorry,
you
need
a
newer
version
of
the
assember,
one
that
is
built
from
\
...
...
arch/ia64/lib/memcpy_mck.S
View file @
3177b564
...
...
@@ -155,7 +155,7 @@ GLOBAL_ENTRY(__copy_user)
mov
ar
.
ec
=
2
(
p10
)
br.dpnt.few
.
aligned_src_tail
;;
//
.
align
32
TEXT_ALIGN
(32)
1
:
EX
(.
ex_handler
,
(
p16
)
ld8
r34
=[
src0
],
16
)
EK
(.
ex_handler
,
(
p16
)
ld8
r38
=[
src1
],
16
)
...
...
@@ -312,7 +312,7 @@ EK(.ex_handler, (p[D]) st8 [dst1] = t15, 4*8)
(
p7
)
mov
ar
.
lc
=
r21
(
p8
)
mov
ar
.
lc
=
r0
;;
//
.
align
32
TEXT_ALIGN
(32)
1
:
lfetch.fault
[
src_pre_mem
],
128
lfetch.fault.excl
[
dst_pre_mem
],
128
br.cloop.dptk.few
1
b
...
...
@@ -518,7 +518,7 @@ EK(.ex_handler, (p17) st8 [dst1]=r39,8); \
shrp
r21
=
r22
,
r38
,
shift
; /* speculative work */ \
br.sptk.few
.
unaligned_src_tail
/*
branch
out
of
jump
table
*/
\
;;
//
.
align
32
TEXT_ALIGN
(32)
.
jump_table
:
COPYU
(8)
//
unaligned
cases
.
jmp1
:
...
...
arch/ia64/lib/memset.S
View file @
3177b564
...
...
@@ -125,7 +125,7 @@ GLOBAL_ENTRY(memset)
(
p_zr
)
br.cond.dptk.many
.
l1b
//
Jump
to
use
stf
.
spill
;; }
//
.
align
32
//
-----
---------------------
//
L1A
:
store
ahead
into
cache
lines
; fill later
TEXT_ALIGN
(32)
//
---------------------
//
L1A
:
store
ahead
into
cache
lines
; fill later
{
.
mmi
and
tmp
=
-(
LINE_SIZE
),
cnt
//
compute
end
of
range
mov
ptr9
=
ptr1
//
used
for
prefetching
...
...
@@ -194,7 +194,7 @@ GLOBAL_ENTRY(memset)
br.cond.dpnt.many
.
move_bytes_from_alignment
//
Branch
no
.
3
;; }
//
.
align
32
TEXT_ALIGN
(32)
.
l1b
:
//
------------------------------------
//
L1B
:
store
ahead
into
cache
lines
; fill later
{
.
mmi
and
tmp
=
-(
LINE_SIZE
),
cnt
//
compute
end
of
range
...
...
@@ -261,7 +261,7 @@ GLOBAL_ENTRY(memset)
and
cnt
=
0x1f
,
cnt
//
compute
the
remaining
cnt
mov.i
ar
.
lc
=
loopcnt
;; }
//
.
align
32
TEXT_ALIGN
(32)
.
l2
:
//
------------------------------------
//
L2A
:
store
32
B
in
2
cycles
{
.
mmb
stf8
[
ptr1
]
=
fvalue
,
8
...
...
arch/ia64/scripts/check-text-align.S
0 → 100644
View file @
3177b564
.
proc
foo
.
prologue
foo
:
.
save
rp
,
r2
nop
0
.
align
64
.
endp
foo
arch/ia64/scripts/unwcheck.sh
deleted
100755 → 0
View file @
65e199f9
#!/bin/sh
# Usage: unwcheck.sh <executable_file_name>
# Pre-requisite: readelf [from Gnu binutils package]
# Purpose: Check the following invariant
# For each code range in the input binary:
# Sum[ lengths of unwind regions] = Number of slots in code range.
# Author : Harish Patil
# First version: January 2002
# Modified : 2/13/2002
# Modified : 3/15/2002: duplicate detection
readelf
-u
$1
| gawk
'\
function todec(hexstr){
dec = 0;
l = length(hexstr);
for (i = 1; i <= l; i++)
{
c = substr(hexstr, i, 1);
if (c == "A")
dec = dec*16 + 10;
else if (c == "B")
dec = dec*16 + 11;
else if (c == "C")
dec = dec*16 + 12;
else if (c == "D")
dec = dec*16 + 13;
else if (c == "E")
dec = dec*16 + 14;
else if (c == "F")
dec = dec*16 + 15;
else
dec = dec*16 + c;
}
return dec;
}
BEGIN { first = 1; sum_rlen = 0; no_slots = 0; errors=0; no_code_ranges=0; }
{
if (NF==5 && $3=="info")
{
no_code_ranges += 1;
if (first == 0)
{
if (sum_rlen != no_slots)
{
print full_code_range;
print " ", "lo = ", lo, " hi =", hi;
print " ", "sum_rlen = ", sum_rlen, "no_slots = " no_slots;
print " "," ", "*******ERROR ***********";
print " "," ", "sum_rlen:", sum_rlen, " != no_slots:" no_slots;
errors += 1;
}
sum_rlen = 0;
}
full_code_range = $0;
code_range = $2;
gsub("..$", "", code_range);
gsub("^.", "", code_range);
split(code_range, addr, "-");
lo = toupper(addr[1]);
code_range_lo[no_code_ranges] = addr[1];
occurs[addr[1]] += 1;
full_range[addr[1]] = $0;
gsub("0X.[0]*", "", lo);
hi = toupper(addr[2]);
gsub("0X.[0]*", "", hi);
no_slots = (todec(hi) - todec(lo))/ 16*3
first = 0;
}
if (index($0,"rlen") > 0 )
{
rlen_str = substr($0, index($0,"rlen"));
rlen = rlen_str;
gsub("rlen=", "", rlen);
gsub(")", "", rlen);
sum_rlen = sum_rlen + rlen;
}
}
END {
if (first == 0)
{
if (sum_rlen != no_slots)
{
print "code_range=", code_range;
print " ", "lo = ", lo, " hi =", hi;
print " ", "sum_rlen = ", sum_rlen, "no_slots = " no_slots;
print " "," ", "*******ERROR ***********";
print " "," ", "sum_rlen:", sum_rlen, " != no_slots:" no_slots;
errors += 1;
}
}
no_duplicates = 0;
for (i=1; i<=no_code_ranges; i++)
{
cr = code_range_lo[i];
if (reported_cr[cr]==1) continue;
if ( occurs[cr] > 1)
{
reported_cr[cr] = 1;
print "Code range low ", code_range_lo[i], ":", full_range[cr], " occurs: ", occurs[cr], " times.";
print " ";
no_duplicates++;
}
}
print "======================================"
print "Total errors:", errors, "/", no_code_ranges, " duplicates:", no_duplicates;
print "======================================"
}
'
include/asm-ia64/asmmacro.h
View file @
3177b564
...
...
@@ -2,7 +2,7 @@
#define _ASM_IA64_ASMMACRO_H
/*
* Copyright (C) 2000-2001, 2003 Hewlett-Packard Co
* Copyright (C) 2000-2001, 2003
-2004
Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
...
...
@@ -89,4 +89,15 @@
# define FSYS_RETURN br.ret.sptk.many b6
#endif
/*
* Up until early 2004, use of .align within a function caused bad unwind info.
* TEXT_ALIGN(n) expands into ".align n" if a fixed GAS is available or into nothing
* otherwise.
*/
#ifdef HAVE_WORKING_TEXT_ALIGN
# define TEXT_ALIGN(n) .align n
#else
# define TEXT_ALIGN(n)
#endif
#endif
/* _ASM_IA64_ASMMACRO_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment