From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27572 invoked by alias); 24 Apr 2002 12:45:29 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 27522 invoked from network); 24 Apr 2002 12:45:15 -0000 Received: from unknown (HELO gwa2.fe.bosch.de) (194.39.218.2) by sources.redhat.com with SMTP; 24 Apr 2002 12:45:15 -0000 Received: (from uucp@localhost) by gwa2.fe.bosch.de (8.10.2/8.10.2) id g3OClLs12919 for ; Wed, 24 Apr 2002 14:47:22 +0200 (MET DST) X-Authentication-Warning: gwa2.fe.bosch.de: uucp set sender to using -f Received: from fez8019.fe.internet.bosch.com(virus-out.fe.internet.bosch.de 10.4.4.19) by gwa2.fe.bosch.de via smap (V2.1) id xma011933; Wed, 24 Apr 02 14:46:48 +0200 Received: from 128.15.0.202 by fez8019.fe.internet.bosch.com (InterScan E-Mail VirusWall NT); Wed, 24 Apr 2002 14:19:26 +0200 Received: by fez7202.de.bosch.com with Internet Mail Service (5.5.2653.19) id ; Wed, 24 Apr 2002 14:42:21 +0200 Message-ID: From: "Scholz Maik (CM-CR/EES3) *" To: "'Manfred Hollstein'" , "Scholz Maik (CM-CR/EES3) *" Cc: "'gcc@gcc.gnu.org'" Subject: AW: howto use -fstack-check Date: Wed, 24 Apr 2002 05:51:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2002-04/txt/msg01236.txt.bz2 what is "gccint.info"? Regards Maik -----Urspr=FCngliche 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() > { > } >=20 > void foo1() > { > int i; > i =3D 1; > foo2(); > } >=20 > 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=3D 0, regs=3D 1/0, args=3D 0, > extra=3D 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=3D 16, regs=3D 2/0, args=3D 0, > extra=3D 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. >=20 > Is there any description how to use the=20 > "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. >=20 > Regards >=20 > Maik >=20 Cheers. l8er manfred --=20 Manfred Hollstein Red Hat GmbH GPG fingerprint: 1D1F 0F5A 32C1 9E2A B8BA 561A E372 AF4C 0581 D831