public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: gcc-gnats@gcc.gnu.org
Subject: target/7238: __builtin_alpha_pkwb generates invalid assembly
Date: Mon, 08 Jul 2002 17:06:00 -0000	[thread overview]
Message-ID: <E17RiUE-0000Yv-00@localhost> (raw)


>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:


             reply	other threads:[~2002-07-09  0:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-08 17:06 Falk Hueffner [this message]
2003-01-03 19:37 bangerth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E17RiUE-0000Yv-00@localhost \
    --to=falk.hueffner@student.uni-tuebingen.de \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).