[Bug target/50242] __attribute__((naked)) is not implemented on IA32 (x86)

2011-12-25 Thread radoslaw.biernacki at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50242

Radoslaw Biernacki  changed:

   What|Removed |Added

 CC||radoslaw.biernacki at gmail
   ||dot com

--- Comment #8 from Radoslaw Biernacki  
2011-12-25 15:37:49 UTC ---
I will attach my comment to discussion.

I see the reason for naked attribute. I develop an embedded OS for small uC and
I would like to make a port for x86 Linux userspace. The scheduler for my OS
will behave as "fibres implementation". It will be similar to old fashioned
setcontext getcontext calls.

I need to compile following function:
void OS_NAKED OS_HOT os_context_switch(os_task_t *new_task)
{
   arch_contextstore_u();
   task_current = new_task;
   task_current->state = TASKSTATE_RUNNING;
   arch_contextrestore_u();
}

where arch_contextstore_u and arch_contextrestore_u are the architecture
depended function implemented by me in pure asm. arch_contextrestore_u will
make a return to address stored in task_current context (previously pushed on
stack by call (x86) instruction while calling os_context_switch).

The problem that I have is, that for x86 Linux environment, gcc does not
support the __attibute__ ((naked)). This attribute is supported on embedded
environments (bare metal) of all gcc ports that I found (like ARM, msp430-gcc,
avr-gcc etc).

So I'm the next person that wait for this implementation on x86 Linux.


[Bug target/25967] Add attribute naked for x86

2011-12-25 Thread radoslaw.biernacki at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25967

Radoslaw Biernacki  changed:

   What|Removed |Added

 CC||radoslaw.biernacki at gmail
   ||dot com

--- Comment #3 from Radoslaw Biernacki  
2011-12-25 15:45:11 UTC ---
I will attach my comment to discussion.

I see the reason for naked attribute. I develop an embedded OS for small uC and
I would like to make a port for x86 Linux userspace. The scheduler for my OS
will behave as "fibres implementation". It will be similar to old fashioned
setcontext getcontext calls.

I need to compile following function:
void OS_NAKED OS_HOT os_context_switch(os_task_t *new_task)
{
   arch_contextstore_u();
   task_current = new_task;
   task_current->state = TASKSTATE_RUNNING;
   arch_contextrestore_u();
}

where arch_contextstore_u and arch_contextrestore_u are the architecture
depended function implemented by me in pure asm. arch_contextrestore_u will
make a return to address stored in task_current context (previously pushed on
stack by call (x86) instruction while calling os_context_switch).

The problem that I have is, that for x86 Linux environment, gcc does not
support the __attibute__ ((naked)). This attribute is supported on embedded
environments (bare metal) of all gcc ports that I found (like ARM, msp430-gcc,
avr-gcc etc).

So I'm the next person which waits for this implementation on x86 Linux.


[Bug target/25967] Add attribute naked for x86

2011-12-25 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25967

Andrew Pinski  changed:

   What|Removed |Added

 CC||congruwer at yahoo dot
   ||co.uk

--- Comment #4 from Andrew Pinski  2011-12-25 
17:18:17 UTC ---
*** Bug 50242 has been marked as a duplicate of this bug. ***


[Bug target/50242] __attribute__((naked)) is not implemented on IA32 (x86)

2011-12-25 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50242

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #9 from Andrew Pinski  2011-12-25 
17:18:17 UTC ---
Dup of much older bug 25967.

*** This bug has been marked as a duplicate of bug 25967 ***


[Bug target/25967] Add attribute naked for x86

2011-12-25 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25967

--- Comment #5 from Andrew Pinski  2011-12-25 
17:21:34 UTC ---
(In reply to comment #2)
> 
> REASON #1

--combine is gone.  -flto replaces it and it works correctly with a separate .s
file.
> 
> REASON #2
> REASON #3

Then what about toplevel inline-asm which solves all the above reasons without
much trouble.


[Bug target/25967] Add attribute naked for x86

2011-12-25 Thread radoslaw.biernacki at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25967

--- Comment #6 from Radoslaw Biernacki  
2011-12-25 21:50:50 UTC ---
What is the main reason to not support the naked attribute in user space ?
In gcc documentation http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
there is is a statement that only reasonable usage of naked attribute is the
inline assembly. Why gcc does not allow that by simply ignoring the naked attr
?

On x86 there is no need mess around with sp and bp pointers if I return from
function by asm ret or jmp.


[Bug other/51678] New: 'make pdf' is broken in libiberty

2011-12-25 Thread kargl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51678

 Bug #: 51678
   Summary: 'make pdf' is broken in libiberty
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ka...@gcc.gnu.org


% gmake pdf
(waiting 1 or minutes)

Underfull \hbox (badness 1) in paragraph at lines 669--673
 []@textrm For ex-am-ple, if @textsl bin[]prefix @textrm is @texttt /alpha/beta
/gamma/gcc/delta[]@textrm , @textsl pre-fix @textrm is
[22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35])
Appendix A [36] (/usr/home/kargl/gcc/gcc4x/libiberty/copying-lib.texi [37]
[38] [39] [40] [41] [42]
/usr/home/kargl/gcc/gcc4x/libiberty/copying-lib.texi:480: This command can appe
ar only outside of any environment, not in environment @enumerate.
@badenverr ...temp , not @inenvironment @thisenv }

@checkenv ...@ifx @thisenv @temp @else @badenverr 
  @fi 
@sectionheading #1#2#3#4->{@checkenv {}
   @csname #2fonts@endcsname @rmisbold @...

@\heading ...tionheading {#1}{sec}{Yomitfromtoc}{}
   @suppressfirstparagraphin...
l.480 @heading NO WARRANTY