This commit was manufactured by cvs2svn to create branch
'gcc-3_1-branch'. From-SVN: r50431
This commit is contained in:
parent
c97a028a6b
commit
de84dc92ac
|
@ -0,0 +1,69 @@
|
|||
#define MASK(N) ((int)((1U << (N)) - 1))
|
||||
#define BITS(N) ((1 << ((N) - 1)) + 2)
|
||||
|
||||
#define FUNC(N) void f##N(int j) { if ((j & MASK(N)) >= BITS(N)) abort();}
|
||||
|
||||
FUNC(3)
|
||||
FUNC(4)
|
||||
FUNC(5)
|
||||
FUNC(6)
|
||||
FUNC(7)
|
||||
FUNC(8)
|
||||
FUNC(9)
|
||||
FUNC(10)
|
||||
FUNC(11)
|
||||
FUNC(12)
|
||||
FUNC(13)
|
||||
FUNC(14)
|
||||
FUNC(15)
|
||||
FUNC(16)
|
||||
FUNC(17)
|
||||
FUNC(18)
|
||||
FUNC(19)
|
||||
FUNC(20)
|
||||
FUNC(21)
|
||||
FUNC(22)
|
||||
FUNC(23)
|
||||
FUNC(24)
|
||||
FUNC(25)
|
||||
FUNC(26)
|
||||
FUNC(27)
|
||||
FUNC(28)
|
||||
FUNC(29)
|
||||
FUNC(30)
|
||||
FUNC(31)
|
||||
|
||||
int main ()
|
||||
{
|
||||
f3(0);
|
||||
f4(0);
|
||||
f5(0);
|
||||
f6(0);
|
||||
f7(0);
|
||||
f8(0);
|
||||
f9(0);
|
||||
f10(0);
|
||||
f11(0);
|
||||
f12(0);
|
||||
f13(0);
|
||||
f14(0);
|
||||
f15(0);
|
||||
f16(0);
|
||||
f17(0);
|
||||
f18(0);
|
||||
f19(0);
|
||||
f20(0);
|
||||
f21(0);
|
||||
f22(0);
|
||||
f23(0);
|
||||
f24(0);
|
||||
f25(0);
|
||||
f26(0);
|
||||
f27(0);
|
||||
f28(0);
|
||||
f29(0);
|
||||
f30(0);
|
||||
f31(0);
|
||||
|
||||
exit(0);
|
||||
}
|
|
@ -0,0 +1,251 @@
|
|||
/* -----------------------------------------------------------------------
|
||||
aix_closures.S - Copyright (c) 2002 Free Software Foundation, Inc.
|
||||
based on darwin_closures.S
|
||||
|
||||
PowerPC Assembly glue.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
``Software''), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
.set r0,0
|
||||
.set r1,1
|
||||
.set r2,2
|
||||
.set r3,3
|
||||
.set r4,4
|
||||
.set r5,5
|
||||
.set r6,6
|
||||
.set r7,7
|
||||
.set r8,8
|
||||
.set r9,9
|
||||
.set r10,10
|
||||
.set r11,11
|
||||
.set r12,12
|
||||
.set r13,13
|
||||
.set r14,14
|
||||
.set r15,15
|
||||
.set r16,16
|
||||
.set r17,17
|
||||
.set r18,18
|
||||
.set r19,19
|
||||
.set r20,20
|
||||
.set r21,21
|
||||
.set r22,22
|
||||
.set r23,23
|
||||
.set r24,24
|
||||
.set r25,25
|
||||
.set r26,26
|
||||
.set r27,27
|
||||
.set r28,28
|
||||
.set r29,29
|
||||
.set r30,30
|
||||
.set r31,31
|
||||
.set f0,0
|
||||
.set f1,1
|
||||
.set f2,2
|
||||
.set f3,3
|
||||
.set f4,4
|
||||
.set f5,5
|
||||
.set f6,6
|
||||
.set f7,7
|
||||
.set f8,8
|
||||
.set f9,9
|
||||
.set f10,10
|
||||
.set f11,11
|
||||
.set f12,12
|
||||
.set f13,13
|
||||
.set f14,14
|
||||
.set f15,15
|
||||
.set f16,16
|
||||
.set f17,17
|
||||
.set f18,18
|
||||
.set f19,19
|
||||
.set f20,20
|
||||
.set f21,21
|
||||
|
||||
#define LIBFFI_ASM
|
||||
#define JUMPTARGET(name) name
|
||||
#define L(x) x
|
||||
.file "aix_closure.S"
|
||||
.toc
|
||||
LC..60:
|
||||
.tc L..60[TC],L..60
|
||||
.csect .text[PR]
|
||||
.align 2
|
||||
|
||||
.csect .text[PR]
|
||||
.align 2
|
||||
.globl ffi_closure_ASM
|
||||
.globl .ffi_closure_ASM
|
||||
.csect ffi_closure_ASM[DS]
|
||||
|
||||
ffi_closure_ASM:
|
||||
.long .ffi_closure_ASM, TOC[tc0], 0
|
||||
.csect .text[PR]
|
||||
.ffi_closure_ASM:
|
||||
|
||||
mflr r0 /* extract return address */
|
||||
stw r0, 8(r1) /* save the return address */
|
||||
|
||||
/* 24 Bytes (Linkage Area) */
|
||||
/* 32 Bytes (params) */
|
||||
/* 104 Bytes (13*8 from FPR) */
|
||||
/* 4 Bytes (result)
|
||||
/* 164 Bytes */
|
||||
|
||||
stwu r1,-164(r1) /* skip over caller save area */
|
||||
|
||||
/* we want to build up an area for the parameters passed */
|
||||
/* in registers (both floating point and integer) */
|
||||
|
||||
/* we store gpr 3 to gpr 10 (aligned to 4) */
|
||||
/* in the parents outgoing area */
|
||||
stw r3, 188(r1)
|
||||
stw r4, 192(r1)
|
||||
stw r5, 196(r1)
|
||||
stw r6, 200(r1)
|
||||
stw r7, 204(r1)
|
||||
stw r8, 208(r1)
|
||||
stw r9, 212(r1)
|
||||
stw r10, 216(r1)
|
||||
|
||||
/* next save fpr 1 to fpr 13 (aligned to 8) */
|
||||
stfd f1, 56(r1)
|
||||
stfd f2, 64(r1)
|
||||
stfd f3, 72(r1)
|
||||
stfd f4, 80(r1)
|
||||
stfd f5, 88(r1)
|
||||
stfd f6, 96(r1)
|
||||
stfd f7, 104(r1)
|
||||
stfd f8, 112(r1)
|
||||
stfd f9, 120(r1)
|
||||
stfd f10, 128(r1)
|
||||
stfd f11, 136(r1)
|
||||
stfd f12, 144(r1)
|
||||
stfd f13, 152(r1)
|
||||
|
||||
/* set up registers for the routine that actually does the work */
|
||||
/* get the context pointer from the trampoline */
|
||||
mr r3,r11
|
||||
|
||||
/* now load up the pointer to the result storage */
|
||||
addi r4,r1,160
|
||||
|
||||
/* now load up the pointer to the saved gpr registers */
|
||||
addi r5,r1,188
|
||||
|
||||
/* now load up the pointer to the saved fpr registers */
|
||||
addi r6,r1,56
|
||||
|
||||
/* now load up the pointer to the outgoing parameter */
|
||||
/* stack in the previous frame */
|
||||
addi r7,r1,220
|
||||
|
||||
/* make the call */
|
||||
bl .ffi_closure_helper_DARWIN
|
||||
nop
|
||||
|
||||
/* now r3 contains the return type */
|
||||
/* so use it to look up in a table */
|
||||
/* so we know how to deal with each type */
|
||||
|
||||
/* look up the proper starting point in table */
|
||||
/* by using return type as offset */
|
||||
addi r5,r1,160 /* get pointer to results area */
|
||||
lwz r4,LC..60(2) /* get address of jump table */
|
||||
slwi r3,r3,2 /* now multiply return type by 4 */
|
||||
lwzx r3,r4,r3 /* get the contents of that table value */
|
||||
add r3,r3,r4 /* add contents of table to table address */
|
||||
mtctr r3
|
||||
bctr /* jump to it */
|
||||
|
||||
L..60:
|
||||
.long L..44-L..60 /* FFI_TYPE_VOID */
|
||||
.long L..50-L..60 /* FFI_TYPE_INT */
|
||||
.long L..47-L..60 /* FFI_TYPE_FLOAT */
|
||||
.long L..46-L..60 /* FFI_TYPE_DOUBLE */
|
||||
.long L..46-L..60 /* FFI_TYPE_LONGDOUBLE */
|
||||
.long L..56-L..60 /* FFI_TYPE_UINT8 */
|
||||
.long L..55-L..60 /* FFI_TYPE_SINT8 */
|
||||
.long L..58-L..60 /* FFI_TYPE_UINT16 */
|
||||
.long L..57-L..60 /* FFI_TYPE_SINT16 */
|
||||
.long L..50-L..60 /* FFI_TYPE_UINT32 */
|
||||
.long L..50-L..60 /* FFI_TYPE_SINT32 */
|
||||
.long L..48-L..60 /* FFI_TYPE_UINT64 */
|
||||
.long L..48-L..60 /* FFI_TYPE_SINT64 */
|
||||
.long L..44-L..60 /* FFI_TYPE_STRUCT */
|
||||
.long L..50-L..60 /* FFI_TYPE_POINTER */
|
||||
|
||||
|
||||
/* case double */
|
||||
L..46:
|
||||
lfd f1,0(r5)
|
||||
b L..44
|
||||
|
||||
/* case float */
|
||||
L..47:
|
||||
lfs f1,0(r5)
|
||||
b L..44
|
||||
|
||||
/* case long long */
|
||||
L..48:
|
||||
lwz r3,0(r5)
|
||||
lwz r4,4(r5)
|
||||
b L..44
|
||||
|
||||
/* case default / int32 / pointer */
|
||||
L..50:
|
||||
lwz r3,0(r5)
|
||||
b L..44
|
||||
|
||||
/* case signed int8 */
|
||||
L..55:
|
||||
addi r5,r5,3
|
||||
lbz r3,0(r5)
|
||||
slwi r3,r3,24
|
||||
srawi r3,r3,24
|
||||
b L..44
|
||||
|
||||
/* case unsigned int8 */
|
||||
L..56:
|
||||
addi r5,r5,3
|
||||
lbz r3,0(r5)
|
||||
b L..44
|
||||
|
||||
/* case signed int16 */
|
||||
L..57:
|
||||
addi r5,r5,2
|
||||
lhz r3,0(r5)
|
||||
extsh r3,r3
|
||||
b L..44
|
||||
|
||||
/* case unsigned int16 */
|
||||
L..58:
|
||||
addi r5,r5,2
|
||||
lhz r3,0(r5)
|
||||
|
||||
/* case void / done */
|
||||
L..44:
|
||||
|
||||
addi r1,r1,164 /* restore stack pointer */
|
||||
lwz r0,8(r1) /* get return address */
|
||||
mtlr r0 /* reset link register */
|
||||
blr
|
||||
|
||||
/* END(ffi_closure_ASM) */
|
|
@ -0,0 +1,189 @@
|
|||
/* -----------------------------------------------------------------------
|
||||
darwin_closures.S - Copyright (c) 2002 Free Software Foundation, Inc.
|
||||
based on ppc_closures.S
|
||||
|
||||
PowerPC Assembly glue.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
``Software''), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#define LIBFFI_ASM
|
||||
#define JUMPTARGET(name) name
|
||||
#define L(x) x
|
||||
.text
|
||||
.globl _ffi_closure_helper_DARWIN
|
||||
|
||||
.text
|
||||
.align 2
|
||||
.globl _ffi_closure_ASM
|
||||
|
||||
.text
|
||||
.align 2
|
||||
_ffi_closure_ASM:
|
||||
|
||||
mflr r0 /* extract return address */
|
||||
stw r0, 8(r1) /* save the return address */
|
||||
|
||||
/* 24 Bytes (Linkage Area) */
|
||||
/* 32 Bytes (outgoing parameter area, always reserved) */
|
||||
/* 104 Bytes (13*8 from FPR) */
|
||||
/* 4 Bytes (result)
|
||||
/* 164 Bytes */
|
||||
|
||||
stwu r1,-164(r1) /* skip over caller save area */
|
||||
|
||||
/* we want to build up an area for the parameters passed */
|
||||
/* in registers (both floating point and integer) */
|
||||
|
||||
/* we store gpr 3 to gpr 10 (aligned to 4) */
|
||||
/* in the parents outgoing area */
|
||||
stw r3, 188(r1)
|
||||
stw r4, 192(r1)
|
||||
stw r5, 196(r1)
|
||||
stw r6, 200(r1)
|
||||
stw r7, 204(r1)
|
||||
stw r8, 208(r1)
|
||||
stw r9, 212(r1)
|
||||
stw r10, 216(r1)
|
||||
|
||||
/* we save fpr 1 to fpr 13 (aligned to 8) */
|
||||
stfd f1, 56(r1)
|
||||
stfd f2, 64(r1)
|
||||
stfd f3, 72(r1)
|
||||
stfd f4, 80(r1)
|
||||
stfd f5, 88(r1)
|
||||
stfd f6, 96(r1)
|
||||
stfd f7, 104(r1)
|
||||
stfd f8, 112(r1)
|
||||
stfd f9, 120(r1)
|
||||
stfd f10, 128(r1)
|
||||
stfd f11, 136(r1)
|
||||
stfd f12, 144(r1)
|
||||
stfd f13, 152(r1)
|
||||
|
||||
/* set up registers for the routine that actually does the work */
|
||||
/* get the context pointer from the trampoline */
|
||||
mr r3,r11
|
||||
|
||||
/* now load up the pointer to the result storage */
|
||||
addi r4,r1,160
|
||||
|
||||
/* now load up the pointer to the saved gpr registers */
|
||||
addi r5,r1,188
|
||||
|
||||
/* now load up the pointer to the saved fpr registers */
|
||||
addi r6,r1,56
|
||||
|
||||
/* now load up the pointer to the outgoing parameter */
|
||||
/* stack in the previous frame */
|
||||
addi r7,r1,220
|
||||
|
||||
/* make the call */
|
||||
bl L(_ffi_closure_helper_DARWIN)
|
||||
|
||||
/* now r3 contains the return type */
|
||||
/* so use it to look up in a table */
|
||||
/* so we know how to deal with each type */
|
||||
|
||||
/* look up the proper starting point in table */
|
||||
/* by using return type as offset */
|
||||
addi r5,r1,160 /* get pointer to results area */
|
||||
addis r4,0,ha16(.L60) /* get address of jump table */
|
||||
addi r4,r4,lo16(.L60)
|
||||
slwi r3,r3,2 /* now multiply return type by 4 */
|
||||
lwzx r3,r4,r3 /* get the contents of that table value */
|
||||
add r3,r3,r4 /* add contents of table to table address */
|
||||
mtctr r3
|
||||
bctr /* jump to it */
|
||||
|
||||
.L60:
|
||||
.long .L44-.L60 /* FFI_TYPE_VOID */
|
||||
.long .L50-.L60 /* FFI_TYPE_INT */
|
||||
.long .L47-.L60 /* FFI_TYPE_FLOAT */
|
||||
.long .L46-.L60 /* FFI_TYPE_DOUBLE */
|
||||
.long .L46-.L60 /* FFI_TYPE_LONGDOUBLE */
|
||||
.long .L56-.L60 /* FFI_TYPE_UINT8 */
|
||||
.long .L55-.L60 /* FFI_TYPE_SINT8 */
|
||||
.long .L58-.L60 /* FFI_TYPE_UINT16 */
|
||||
.long .L57-.L60 /* FFI_TYPE_SINT16 */
|
||||
.long .L50-.L60 /* FFI_TYPE_UINT32 */
|
||||
.long .L50-.L60 /* FFI_TYPE_SINT32 */
|
||||
.long .L48-.L60 /* FFI_TYPE_UINT64 */
|
||||
.long .L48-.L60 /* FFI_TYPE_SINT64 */
|
||||
.long .L44-.L60 /* FFI_TYPE_STRUCT */
|
||||
.long .L50-.L60 /* FFI_TYPE_POINTER */
|
||||
|
||||
|
||||
/* case double */
|
||||
.L46:
|
||||
lfd f1,0(r5)
|
||||
b .L44
|
||||
|
||||
/* case float */
|
||||
.L47:
|
||||
lfs f1,0(r5)
|
||||
b .L44
|
||||
|
||||
/* case long long */
|
||||
.L48:
|
||||
lwz r3,0(r5)
|
||||
lwz r4,4(r5)
|
||||
b .L44
|
||||
|
||||
/* case default / int32 / pointer */
|
||||
.L50:
|
||||
lwz r3,0(r5)
|
||||
b .L44
|
||||
|
||||
/* case signed int8 */
|
||||
.L55:
|
||||
addi r5,r5,3
|
||||
lbz r3,0(r5)
|
||||
extsb r3,r3
|
||||
b .L44
|
||||
|
||||
/* case unsigned int8 */
|
||||
.L56:
|
||||
addi r5,r5,3
|
||||
lbz r3,0(r5)
|
||||
b .L44
|
||||
|
||||
/* case signed int16 */
|
||||
.L57:
|
||||
addi r5,r5,2
|
||||
lhz r3,0(r5)
|
||||
extsh r3,r3
|
||||
b .L44
|
||||
|
||||
/* case unsigned int16 */
|
||||
.L58:
|
||||
addi r5,r5,2
|
||||
lhz r3,0(r5)
|
||||
|
||||
/* case void / done */
|
||||
.L44:
|
||||
|
||||
addi r1,r1,164 /* restore stack pointer */
|
||||
lwz r0,8(r1) /* get return address */
|
||||
mtlr r0 /* reset link register */
|
||||
blr
|
||||
|
||||
/* END(ffi_closure_ASM) */
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
// 2002-03-05 Stephen M. Webb <stephen.webb@bregmasoft.com>
|
||||
|
||||
// Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// 23.2.5 class vector<bool>
|
||||
|
||||
#include <vector>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
void test01()
|
||||
{
|
||||
std::vector<bool>::iterator i;
|
||||
++i;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
test01();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue