This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/7238: __builtin_alpha_pkwb generates invalid assembly


>Number:         7238
>Category:       target
>Synopsis:       __builtin_alpha_pkwb generates invalid assembly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 08 17:06:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Falk Hueffner
>Release:        3.2 20020707 (experimental)
>Organization:
>Environment:
System: Linux borkum 2.4.18 #1 Tue Jul 2 23:35:32 CEST 2002 alpha unknown
Architecture: alpha

	
host: alphapca56-unknown-linux-gnu
build: alphapca56-unknown-linux-gnu
target: alphapca56-unknown-linux-gnu
configured with: ../configure --enable-languages=c
>Description:
With the input below, gcc generates a pkwb statement that uses a
floating point register, which is not valid. Also, it loses pkwb(23),
so the result would be wrong even if it had chosen an integer
register.
>How-To-Repeat:
% cat bug.c
unsigned long simple_idct_put(unsigned long l)
{
    l = __builtin_alpha_pkwb(l) | (__builtin_alpha_pkwb(23) << 32);
    return __builtin_alpha_pkwb(l);
}

% gcc -O3 -mcpu=pca56 -c bug.c 
/tmp/ccbGMrgd.s: Assembler messages:
/tmp/ccbGMrgd.s:13: Error: inappropriate arguments for opcode `pkwb'
/tmp/ccbGMrgd.s:14: Error: inappropriate arguments for opcode `pkwb'

% gcc -O3 -mcpu=pca56 -S bug.c && cat bug.s 
        .set noat
        .set noreorder
        .arch pca56
        .text
        .align 2
        .align 4
        .globl simple_idct_put
        .ent simple_idct_put
$simple_idct_put..ng:
simple_idct_put:
        .frame $30,0,$26,0
        .prologue 0
        pkwb $16,$f10
        pkwb $f10,$0
        ret $31,($26),1
        .end simple_idct_put
        .ident  "GCC: (GNU) 3.2 20020707 (experimental)"
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]