public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Scholz Maik (CM-CR/EES3) *" <Maik.Scholz@de.bosch.com>
To: "'Manfred Hollstein'" <manfredh@redhat.com>,
	"Scholz Maik (CM-CR/EES3) *" <Maik.Scholz@de.bosch.com>
Cc: "'gcc@gcc.gnu.org'" <gcc@gcc.gnu.org>
Subject: AW: howto use -fstack-check
Date: Wed, 24 Apr 2002 05:51:00 -0000	[thread overview]
Message-ID: <D7C2090CD687D311AB160008C7E62F9204EE0739@himail5.hi.de.bosch.com> (raw)

what is "gccint.info"?

Regards

Maik

-----Ursprüngliche Nachricht-----
Von: Manfred Hollstein [mailto:manfredh@redhat.com]
Gesendet: Mittwoch, 24. April 2002 14:33
An: Scholz Maik (CM-CR/EES3) *
Cc: 'gcc@gcc.gnu.org'
Betreff: Re: howto use -fstack-check


Scholz Maik (CM-CR/EES3) * wrote:
> small example:
> foo.c:
> 	void foo2()
> 	{
> 	}
> 
> 	void foo1()
> 	{
> 	  int i;
> 	  i = 1;
> 	  foo2();
> 	}
> 
> miplsisa32-elf -S -fstack-check
> foo.s:
> 	.file	1 "foo.c"
> 	.section	.text
> gcc2_compiled.:
> __gnu_compiled_c:
> 	.text
> 	.align	2
> 	.globl	foo2
> 	.ent	foo2
> foo2:
> 	.frame	$fp,16,$31		# vars= 0, regs= 1/0, args= 0,
> extra= 0
> 	.mask	0x40000000,-16
> 	.fmask	0x00000000,0
> 	subu	$sp,$sp,16
> 	sw	$fp,0($sp)
> 	move	$fp,$sp
> 	move	$sp,$fp
> 	lw	$fp,0($sp)
> 	addu	$sp,$sp,16
> 	j	$31
> 	.end	foo2
> 	.align	2
> 	.globl	foo1
> 	.ent	foo1
> foo1:
> 	.frame	$fp,32,$31		# vars= 16, regs= 2/0, args= 0,
> extra= 0
> 	.mask	0xc0000000,-12
> 	.fmask	0x00000000,0
> 	subu	$sp,$sp,32
> 	sw	$31,20($sp)
> 	sw	$fp,16($sp)
> 	move	$fp,$sp
> added code	|	addu	$2,$sp,-4392
> added code	|	#.set	volatile
> added code	|	sw	$0,0($2)
> added code	|	#.set	novolatile
> 	li	$2,1			# 0x1
> 	sw	$2,0($fp)
> 	jal	foo2
> 	move	$sp,$fp
> 	lw	$31,20($sp)
> 	lw	$fp,16($sp)
> 	addu	$sp,$sp,32
> 	j	$31
> 	.end	foo1

I'm not really MIPS aware, but assuming "addu" means "add unsigned"
and "sw" means "store word" I cannot imagine how those added insns
are of any use.

> 
> Is there any description how to use the 
> "extra generated code".

gccint.info describes three alternatives available to gcc hackers
who want to implement stack checking for their particular port, but
other than that, I'm afraid, no.

> 
> Regards
> 
> Maik
> 

Cheers.

l8er
manfred

-- 
Manfred Hollstein                         <mailto:manfredh@redhat.com>
Red Hat GmbH
GPG fingerprint:    1D1F 0F5A 32C1 9E2A B8BA  561A E372 AF4C 0581 D831

             reply	other threads:[~2002-04-24 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-24  5:51 Scholz Maik (CM-CR/EES3) * [this message]
2002-04-24  6:36 ` Manfred Hollstein
  -- strict thread matches above, loose matches on Subject: below --
2002-04-24  5:34 AW: " Scholz Maik (CM-CR/EES3) *

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=D7C2090CD687D311AB160008C7E62F9204EE0739@himail5.hi.de.bosch.com \
    --to=maik.scholz@de.bosch.com \
    --cc=gcc@gcc.gnu.org \
    --cc=manfredh@redhat.com \
    /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).