mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Anders Magnusson <ragge@ludd.ltu.se>
To: Isaac Dunham <ibid.ag@gmail.com>
Cc: musl@lists.openwall.com, pcc@lists.ludd.ltu.se
Subject: Re: pcc i386 -fPIC compiler error on src/complex/catanf.c
Date: Mon, 05 Jan 2015 11:31:11 +0100	[thread overview]
Message-ID: <54AA67EF.8000104@ludd.ltu.se> (raw)
In-Reply-To: <20150104210403.GA1801@newbook>

Isaac Dunham skrev den 2015-01-04 22:04:
> On Sun, Jan 04, 2015 at 08:24:54PM +0100, Anders Magnusson wrote:
>> Iain Hibbert skrev den 2015-01-04 18:47:
>>> On Sat, 3 Jan 2015, Isaac Dunham wrote:
>>>
>>>> Hello,
>>>> With recent pcc (built from cvs since 1.1.0 was released), I've tried
>>>> building musl a few times, but the shared build consistently dies
>>>> on src/complex/catanf.c (command wrapped to avoid getting mangled
>>>> in the mail):
>>>> $ make
>>>> pcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard    \
>>>>    -frounding-math -D_XOPEN_SOURCE=700 -I./arch/i386 -I./src/internal \
>>>>    -I./include  -Os -pipe -fomit-frame-pointer -fno-unwind-tables     \
>>>>    -fno-asynchronous-unwind-tables -Wa,--noexecstack -march=i486      \
>>>>    -Werror=implicit-function-declaration -Werror=implicit-int 	     \
>>>>    -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector    \
>>>>    -fPIC -DSHARED -c -o src/complex/catanf.lo src/complex/catanf.c
>>>> src/complex/catanf.c, line 80: compiler error: bad STCALL hidden reg
>>>> error: /usr/libexec/ccom terminated with status 1
>>>> Makefile:124: recipe for target 'src/complex/catanf.lo' failed
>>>> make: *** [src/complex/catanf.lo] Error 1
>>>>
>>>> Line 80 is the closing bracket of _redupif(), which is fairly basic
>>>> floating point math.
>>> it will likely be something inside that function that does not show up
>>> until the function is being emitted. STCALL is something to do with
>>> structure arguments, which some kinds of floating point are big enough to
>>> be considered.. so I guess some kind of double or long double arguments?
>>>
>> This assertion occurs because pass2 code expects a hidden argument to be
>> present when calling a struct return function, but the hidden arg cannot be
>> found in the argument list, and in this special case the hidden arg shall be
>> in a register.
>>
>> I would like a preprocessed output from the above to diagnose further (which
>> means to just add a -E to the line above).
> Ok, will send.
>
Thanks, fixed now.
Float complex struct return were not dealt with as it should in the PIC 
case.

-- Ragge
_______________________________________________
Pcc mailing list
Pcc@lists.ludd.ltu.se
https://lists.ludd.ltu.se/cgi-bin/mailman/listinfo/pcc


  parent reply	other threads:[~2015-01-05 10:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-04  5:53 Isaac Dunham
2015-01-04 17:47 ` Iain Hibbert
2015-01-04 18:01   ` Re: [Pcc] " Rich Felker
2015-01-04 19:26     ` Jens Gustedt
2015-01-04 19:24   ` Anders Magnusson
2015-01-04 21:04     ` Isaac Dunham
2015-01-04 21:54       ` Isaac Dunham
2015-01-05 10:31       ` Anders Magnusson [this message]
2015-01-05 23:25         ` [Pcc] " Isaac Dunham
2015-01-06  3:27           ` Anders Magnusson

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=54AA67EF.8000104@ludd.ltu.se \
    --to=ragge@ludd.ltu.se \
    --cc=ibid.ag@gmail.com \
    --cc=musl@lists.openwall.com \
    --cc=pcc@lists.ludd.ltu.se \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).