Re: arm-elf float-abi defaults...

2010-05-14 Thread DJ Delorie
> The compiler should generate a pseudo-op that is processed by the > assembler. If the right pseudo-op doesn't already exist, it needs > to be added to both the assembler and compiler. The assembler has pseudo-s for ".fpu" which says what kind of FPU it has, but the generic hard/soft choice is

Re: arm-elf float-abi defaults...

2010-05-14 Thread DJ Delorie
> I am strongly of the opinion that the right way to do this is to have > the compiler generate appropriate directives in the assembly files it > generates -- and to have users do the same. Relying on the defaults is > just too dangerous. So... where should this go?

arm-elf float-abi defaults...

2010-05-11 Thread DJ Delorie
I discovered that if you build a plain arm-elf toolchain, the default float-abis for gcc and gas don't match. I added this patch locally to make it "just work" but it seems to me it would be better to have the defaults match, although I'm not sure how to enforce that. Comments? Suggestions? Ind

Re: may_be_unaligned_p bug?

2010-04-12 Thread DJ Delorie
> OK, I'll do some testing with it tomorrow. Which GCC versions are affected? I tested trunk and an old 4.2.1 internal branch, and found the bug on both, so anything in between would be affected too. It goes back at least to this patch, which mostly fixed the bug: 2008-02-19 Christian Bruel

Re: may_be_unaligned_p bug?

2010-04-12 Thread DJ Delorie
I can confirm this fixes my test case. Had I known about highest_pow2_factor() I might have come up with this myself ;-) > Index: tree-ssa-loop-ivopts.c > === > --- tree-ssa-loop-ivopts.c(revision 158148) > +++ tree-ssa-loop-ivo

may_be_unaligned_p bug?

2010-04-09 Thread DJ Delorie
In tree-ssa-loop-ivopts.c:may_be_unaligned_p(), we call get_inner_reference to figure out bitpos, but we don't take into account toffset - which may make the reference less aligned than we expect. Is this supposed to be accounted for by STEP ? It doesn't always work with nested arrays - STEP is

Re: why multiple libiberty directories

2010-03-01 Thread DJ Delorie
> Is it still used outside the "Cygnus tree"? How should I know? I don't know what users of free software do with it... It's a target library. Anyone writing code for any target might use it.

Re: why multiple libiberty directories

2010-03-01 Thread DJ Delorie
> But I've previously noted that target libiberty seems completely useless; It's a target library, like newlib, libz, libstdc++, or anything else. How do you know there are no target applications that want to link against it?

Re: Combined tree fails to build -- libtool version mismatch?

2010-01-11 Thread DJ Delorie
> DJ, can you add these files to the list that we get email about? Added: ltgcc.m4 ltmain.sh ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4

Re: How to define target-specific PSImode?

2009-12-07 Thread DJ Delorie
Note that the m32c port uses PSImode, so it may offer some suggestions as example code.

Re: [LTO merge][0/15] Description of the final 15 patches

2009-09-28 Thread DJ Delorie
> gets from the linker. Since the linker plugin is a shared > object, and it uses libiberty functions, it needs to use a > shared libiberty. Why can't they just link a static libiberty?

Re: Bitfields

2009-09-21 Thread DJ Delorie
"Joseph S. Myers" writes: > It has been proposed (and not rejected, but not yet implemented) I'm still working on it...

m32c vs loop-opts - possible work-around

2009-09-08 Thread DJ Delorie
If loop optimization assumes sizeof(void *) == sizeof(size_t) and won't work correctly otherwise, perhaps a check for that condition in gate_tree_ssa_loop_ivopts() would be appropriate? I thought of just disabling that flag in m32c.c, but I figured a more generic solution would make more sense, a

Re: Targets still needing stdint.h type information

2009-08-13 Thread DJ Delorie
> * DJGPP Committed. 2009-08-13 DJ Delorie * config/i386/djgpp-stdint.h: New. * config.gcc (djgpp): Use it. Index: config.gcc === --- config.gcc (revision 150731) +++ config.gcc (working copy) @@ -1169

is pr26565 broken again?

2009-07-28 Thread DJ Delorie
On s390x it produces this insn: (insn 8 7 9 3 323444.c:15 (set (mem/s:DI (reg:DI 46) [0 S8 A64]) (mem/s:DI (reg/v/f:DI 45 [ tp ]) [0 S8 A64])) -1 (nil)) Note that the alignments are 64 bit again, despite the field being packed. mep-elf has similar results. void *memcpy(void *dest, co

Re: Add crc32 function to libiberty

2009-07-24 Thread DJ Delorie
> Your code uses the (one and only) CRC-32 polynomial 0x04c11db7, so just > describing it as the "CRC-32" function should be sufficient documentation. > It's the same CRC function as used by PKZIP, Ethernet, and chksum. > It's not compatible with the Intel CRC32 instruction which uses the > CRC-32

[mep] legitimizing control registers

2009-07-21 Thread DJ Delorie
Committed. * config/mep/mep.c (mep_legitimize_arg): Leave control registers alone too. Index: config/mep/mep.c === --- config/mep/mep.c(revision 149868) +++ config/mep/mep.c(working copy) @@ -6201,13 +6201,15

Re: bitfields: types vs modes?

2009-07-16 Thread DJ Delorie
> At the risk of being naive: implement it. I'm not quite sure what > you're looking for here? Ok, time to ask for a hint. I started at get_best_mode(), adding a TREE argument for the type, and worked my way out, adding arguments to functions as needed to propogate the type information. It's g

Re: bitfields: types vs modes?

2009-07-14 Thread DJ Delorie
> At the risk of being naive: implement it. I'm not quite sure what > you're looking for here? I'd rather have some confidence that the way I choose to implement it would be acceptable to those who would be reviewing it ;-) I'll give it a shot at the same point in the code where we call the tar

Re: bitfields: types vs modes?

2009-07-14 Thread DJ Delorie
> >> I think the ARM specification is pretty sensible, and would make a > >> good cross-platform approach. > > > > Could you distill it for us? > > The relevant bits are from AAPCS \S 7.1.7.5, and quoted below. I finally got the last of the feedback I needed from our customers, and they agree

Re: TARGET_OPTION_CAN_INLINE_P vs TARGET_CAN_INLINE_P

2009-07-09 Thread DJ Delorie
Thanks, committed.

Re: TARGET_OPTION_CAN_INLINE_P vs TARGET_CAN_INLINE_P

2009-07-09 Thread DJ Delorie
> The OPTION is there because this was introduced for the option > attribute. But the entry in the target structure is named > can_inline_p, and the macro should be TARGET_CAN_INLINE_P. So the > doc is the desired state, and the code is not. How's this? * targhooks.c (default_target_ca

TARGET_OPTION_CAN_INLINE_P vs TARGET_CAN_INLINE_P

2009-07-08 Thread DJ Delorie
The documentation says: @deftypefn {Target Hook} bool TARGET_CAN_INLINE_P (tree @var{caller}, tree @var{callee}) But the code says: #ifndef TARGET_OPTION_CAN_INLINE_P #define TARGET_OPTION_CAN_INLINE_P default_target_option_can_inline_p #endif #define TARGET_OPTION_HOOKS \

Re: -frename-registers bug?

2009-07-02 Thread DJ Delorie
> You could file this in Bugzilla instead, with all required fields > filled in (host, target, compiler revision number, etc), and test > cases as text attachments ;-) Ok. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40626

-frename-registers bug?

2009-07-02 Thread DJ Delorie
When compiled with -frename-registers, this test case produces invalid code. Specifically, the cpadd4.h opcode clobbers $c1 but the cpsub2.h assumes it still has the value "a" in it. Compiling with -fno-rename-registers results in valid code. I've attached the full testcase and before/after dum

Re: Ping: New Toshiba Media Processor (mep-elf) port and maintainer

2009-06-18 Thread DJ Delorie
> I thought I had sent you mail approving the changes 2 weeks ago. > Perhaps I misremembered, or perhaps it got lost somewhere. All of > my comments about the internals of the mep would be things to do if > you desired, but as port maintainer, I don't see that we have to > apply standards set for

Re: genrecog: ran out of alphabet

2009-06-17 Thread DJ Delorie
> > The opcode swaps two register banks. 32 SETs total. > > Perhaps you can cheat by using larger modes. E.g., if it's a 32-bit > machine, using DImode will cut the number of operands in half. They're DImode already, but I did figure out a workaround that reduces it to 16 SETs, so I'm all set.

Re: genrecog: ran out of alphabet

2009-06-17 Thread DJ Delorie
> That sounds like an awkward insn. The opcode swaps two register banks. 32 SETs total. > It would be nice if genrecog at least checked for an out of range > letter. Or used "ch-'a' < 32" tests, but would that work with EBCDIC build machines?

Ping: New Toshiba Media Processor (mep-elf) port and maintainer

2009-06-16 Thread DJ Delorie
> Pending initial (technical) approval Ping? Still waiting for technical approval from a global maintainer. http://people.redhat.com/dj/mep/

genrecog: ran out of alphabet

2009-06-16 Thread DJ Delorie
genrecog uses strings to keep track of where it is, specifically, digits and letters. I've got an insn that writes to more than 26 registers. Would switching to something bigger than [A-Z] be difficult? Perhaps using Japanese letters instead of English? ;-)

Re: sched2, ret, use, and VLIW bundling

2009-06-09 Thread DJ Delorie
Some progress... the scheduler is willing to schedule them together if I define the SCHED_REORDER2 hook (just SCHED_REORDER was insufficient), and always return the number of ready insns. In my case, the VLIW packing restrictions are fully defined by a DFA; I don't need to further restrict packin

Re: sched2, ret, use, and VLIW bundling

2009-06-09 Thread DJ Delorie
> The problem may be in the dependency cost between the SET (insn 27) > and the USE (insn 30) being >= 1. Have you tried using > targetm.sched.adjust_cost() hook to set the cost of USE to 0? It doesn't get called for those two insns. > Anyway, this seems strange, the scheduler should just outpu

Re: New Toshiba Media Processor (mep-elf) port and maintainer

2009-06-08 Thread DJ Delorie
> Pending initial (technical) approval So... Can I get a global maintainer to approve it?

sched2, ret, use, and VLIW bundling

2009-06-05 Thread DJ Delorie
I'm working on a VLIW coprocessor for MeP. One thing I noticed is that sched2 won't bundle the function's RET with the insn that sets the return value register, apparently because there's an intervening USE of that register (insn 30 in the example below). Is there any way around this? The retur

Re: New Toshiba Media Processor (mep-elf) port and maintainer

2009-06-05 Thread DJ Delorie
Thanks!

question about TARGET_MUST_PASS_IN_STACK

2009-06-02 Thread DJ Delorie
On xstormy16, when structures with variable-length arrays are passed to functions (execute/20020412-1.c), it appears that they're passed by reference (based on examining the stack), despite the port not explicitly requesting that. This causes a mis-match in the va_arg code, which assumes the arra

Re: bitfields: types vs modes?

2009-05-20 Thread DJ Delorie
> I think the ARM specification is pretty sensible, and would make a > good cross-platform approach. Could you distill it for us? If it's acceptable to my two customers, it would be a good starting point to define an API for the targets.

Re: bitfields: types vs modes?

2009-05-20 Thread DJ Delorie
We seem to have dropped this discussion. I now have *two* customers asking for this functionality. Can we pick it up again? We need to decide: 1. If the functionality will be allowed in gcc at all 2. What info the target needs to be provided to make the choices it wants 3. What, if any, comm

Re: opaque vector types?

2009-05-05 Thread DJ Delorie
Andrew Pinski writes: > You could do what the rs6000 back-end does for the altivec builtins > and resolve them while the parser is run (the SPU back-end does the > same thing too). Yes there are opaque vector types, you just use > build_opaque_vector_type instead of build_vector_type. Thanks, I

opaque vector types?

2009-05-05 Thread DJ Delorie
Is there an opaque vector type? Something that can be assigned to/from other vector types of the same size, without warning? I'm working on a coprocessor which has separate SIMD arithmetic operations for each data size, but only one SIMD logical operation for all sizes. I.e. there's four ADD in

Re: CONSTRAINT__LIMIT

2009-05-04 Thread DJ Delorie
> Ian, thanks for reporting this. I'll investigate this more. It > affects only ports using priority allocation (I know only one which > is m32c). DJ just recently reported a reload failure problem on > m32c. Probably that is because of this wrong code. In checking through this code, I see th

Re: dg-warning: bogus target expectations?

2009-04-27 Thread DJ Delorie
> When you used verbose, did you pass --verbose within RUNTESTFLAGS? Yes, I passed enough -v's to see what was happening. Odd. Well, if you've proven it to yourself, that's good enough for me.

Re: testsuite fixes for small doubles

2009-04-27 Thread DJ Delorie
> On Thu, 2009-04-23 at 20:34 -0400, DJ Delorie wrote: > > SH (and I'm sure others) has some multilibs (like -m2a-single-only) > > where sizeof(double) is 4, which breaks some testcases. Here's a > > patch which adds checks for small doubles (and small long double

Re: dg-warning: bogus target expectations?

2009-04-27 Thread DJ Delorie
> I'm convinced that if check_effective_target_xxx exists then it is > called and the test directive works as intended. Hmmm... how did you prove this? I tried putting verbose in them, nothing printed. I tried reversing them, no change in test results.

Re: testsuite fixes for small doubles

2009-04-24 Thread DJ Delorie
> The fp-int-convert tests are meant to be correct independent of the sizes > involved, so this change is inappropriate and may point to a bug > elsewhere. It did, I fixed it. Thanks for the insight.

Re: testsuite fixes for small doubles

2009-04-24 Thread DJ Delorie
> But it doesn't need to store it *exactly*; it only tests that the > conversion reverses if PREC_OK (argument to TEST_I_F_VAL) is true, and > TEST_I_F sets PREC_OK to what should be an appropriate value (based on the > types involved, LDBL_MANT_DIG, etc.) in each case. The other tests are >

Re: testsuite fixes for small doubles

2009-04-24 Thread DJ Delorie
The fp-int-convert-long-double test does this: static volatile signed long long ivin, ivout; static volatile long double fv1, fv2; ivin = ((signed long long) (((unsigned long long) ~(unsigned long long) 0) >> 1)); fv1 = ((signed long long) (((unsigned long long) ~(unsigned long long) 0)

Re: testsuite fixes for small doubles

2009-04-23 Thread DJ Delorie
> On Thu, 23 Apr 2009, DJ Delorie wrote: > > +# Return 1 if the target supports double larger than float, > > +# 0 otherwise. > > + > > +proc check_effective_target_large_double { } { > > +return [check_no_compiler_messages large_double object { > > +

testsuite fixes for small doubles

2009-04-23 Thread DJ Delorie
SH (and I'm sure others) has some multilibs (like -m2a-single-only) where sizeof(double) is 4, which breaks some testcases. Here's a patch which adds checks for small doubles (and small long doubles), and adjusts some of the tests which depend on large doubles. Comments? Ok to apply? *

dg-warning: bogus target expectations?

2009-04-23 Thread DJ Delorie
In gcc.dg/Wconversion-real.c we see this: vdouble = 3.1L; /* { dg-warning "conversion" "" { target large_long_double } } */ It turns out check_effective_target_large_long_double is NEVER called. You can change it to some bogus string: fdouble (3.1L); /* { dg-warning "conversion" "" { targe

Re: [m32c] IRA reload failures in libstdc++

2009-04-23 Thread DJ Delorie
> We can test for the 'this cannot possibly work' cases, i.e. where there is > no suitable register at all. That would address the problems you have > originally identified for the m32c. Sounds good to me ;-)

Re: [m32c] IRA reload failures in libstdc++

2009-04-23 Thread DJ Delorie
> > m32c has no problem loading a 24-bit register from a 32-bit memory > > location. > > The only truncsipsi2* alternative part that seems to match is Raa / Sd* . > Does that mean that Sd* is as good as m? m32c doesn't use any of the single-character constraints, as they're too general to pretty

Re: [m32c] IRA reload failures in libstdc++

2009-04-22 Thread DJ Delorie
> From looking at the m32c machine description I got the impression > that you can't directly load A_REGS in PSImode from a PSImode subreg > of a SImode memory location, but maybe I was mistaken. The big problem with m32c (--mcpu=m32c) is that pointers are 24 bits, which doesn't correspond to an

Re: [m32c] IRA reload failures in libstdc++

2009-04-22 Thread DJ Delorie
> I suggest making reload reload the PSImode subreg instead, and > make the m32c machine description provide for a tertiary > reload so that the value can be loaded & truncated. Don't know how to set up a tertiary reload (it's not documented anywhere). Is this the type of patch you're thining ab

[m32c] IRA reload failures in libstdc++

2009-04-20 Thread DJ Delorie
This is typical of the types of failures m32c got before IRA, too. I had a good build on Feb 19th, but if I try to reproduce it, it fails too. Fails with -O2, works with -Os. Note: you might need -fno-ivopts to get around the recent m32c/IV problems. Any ideas? Any thoughts on why gcc has so

Re: M32C vs PR tree-optimization/39233

2009-04-16 Thread DJ Delorie
> I'm not sure if this is the same problem, but didn't I suggest in > the past to fix this up during expansion? That is, if we end up > with a POINTER_PLUS_EXPR with different mode size pointer and offset > promote (or demote) the offset argument to pointer size properly? > > What happened to th

Re: M32C vs PR tree-optimization/39233

2009-04-15 Thread DJ Delorie
> yes; however, maybe it would be easier to wait till Richard finishes the > work on not representing the overflow semantics in types (assuming that's > going to happen say in a few weeks?), which should make the fix > unnecessary, Another thought - is this bug in the 4.4 branch? If so, a 4.4 fi

Re: M32C vs PR tree-optimization/39233

2009-04-15 Thread DJ Delorie
> yes; however, maybe it would be easier to wait till Richard finishes the > work on not representing the overflow semantics in types (assuming that's > going to happen say in a few weeks?), which should make the fix > unnecessary, Ah, ok. Can I ask for m32c to be on the test list for this work?

M32C vs PR tree-optimization/39233

2009-04-15 Thread DJ Delorie
As of this fix (yes, I know it was some time ago - I've been busy), the m32c-elf build fails building the target libiberty: ./cc1 -fpreprocessed regex.i -quiet -dumpbase regex.c -mcpu=m32cm \ -auxbase-strip regex.o -g -O2 -W -Wall -Wwrite-strings -Wc++-compat \ -Wstrict-prototypes -pedantic -vers

Re: bitfields: types vs modes?

2009-04-06 Thread DJ Delorie
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042c/IHI0042C_aapcs.pdf > > and, in particular, \S 7.1.7.5, entitled "Volatile bit-fields". > > A first question is if these are the semantics that you're looking for > in your project. If so, then we could collaborate with you on > impleme

Re: bitfields: types vs modes?

2009-03-31 Thread DJ Delorie
So... can I/we move forward on this? Or will such a change be rejected? BTW, Since sending this I discovered that gcc treats these differently wrt TARGET_NARROW_VOLATILE_BITFIELD: volatile struct { unsigned int a:8; unsigned int b:24; } t1; volatile struct { unsigned int a:7; unsigned

Re: stdint.h type information needed

2009-03-31 Thread DJ Delorie
> I expect most of the OSes listed do; the types should still be entered > into GCC (so the Fortran front end can know them, for example), and Well, I'm not a big fan of duplicating information, but if that's what you want to do, here it is. Enjoy. /* Copyright (C) 2003

Re: stdint.h type information needed

2009-03-31 Thread DJ Delorie
DJGPP has its own , at least in DJGPP 2.04.

Re: [cond-optab] update

2009-03-19 Thread DJ Delorie
> Besides obvious register allocation differences m32c is very sensitive to register allocation issues. > you basically duplicate the cmp patterns into cbranch and m32c already has a cbranch, though. It gets split after reload. Also, m32c needs a separate compare RTL insn in the end because i

Re: GCC 4.4.0 Status Report (2009-03-13)

2009-03-13 Thread DJ Delorie
Richard Guenther writes: > We have been asked by the SC to not branch for now but wait for > the wording for the new runtime license to arrive from the FSF and > that being put in place. We've been waiting a long time. At what point do we give up and branch anyway?

Re: bitfields: types vs modes?

2009-03-10 Thread DJ Delorie
> Can you provide example code? I'm confused enough to believe > that you *should* get this effect with PCC_BITFIELD_TYPE_MATTERS > (modulo current bugs). Imagine a device with four 8-bit registers followed by a 32-bit register with an 8-bit field: bytestatus (read-only, clears after readin

bitfields: types vs modes?

2009-03-09 Thread DJ Delorie
One of our customers has a chip with memory-mapped peripheral registers that need to be accessed in a specific mode. The registers represent bitfields within the hardware, so a volatile struct is an obvious choice to represent them in C. However, gcc has a very simplistic heuristic for deciding

default_function_rodata_section bug?

2009-03-05 Thread DJ Delorie
In varasm.c default_function_rodata_section(): section * default_function_rodata_section (tree decl) { if (decl != NULL_TREE && DECL_SECTION_NAME (decl)) { const char *name = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); if (DECL_ONE_ONLY (decl) && HAVE_COMDAT_GROUP)

TARGET_NARROW_VOLATILE_BITFIELD

2009-01-29 Thread DJ Delorie
The documentation doesn't match the implementation: tm.texi:@deftypefn {Target Hook} bool TARGET_NARROW_VOLATILE_BITFIELDS (void) target-def.h:#define TARGET_NARROW_VOLATILE_BITFIELD hook_bool_void_false target-def.h: TARGET_NARROW_VOLATILE_BITFIELD, \ Note the 'S' at the end in the d

Re: CGEN-generated files vs GPL

2009-01-28 Thread DJ Delorie
> I believe the source code (i.e., what you'd change to modify the > intrinsics) needs including in the GCC release tarballs. I don't > think CGEN itself needs including, any more than OCaml needs > including because the ARM NEON intrinsic generators are written in > OCaml. The same cgen files p

CGEN-generated files vs GPL

2009-01-28 Thread DJ Delorie
What are the implications (GPL-wise) of using CGEN-generated files in gcc? Specifically, I'm working on a second attempt to contribute the MeP port, and its intrinsics are CGEN-generated (and there are a *lot* of them - most opcodes have an intrinsic). I'd rather not have to manually enter all t

Re: Libiberty issue vs cygwin [was Re: This is a Cygwin failure yeah?]

2009-01-15 Thread DJ Delorie
IIRC, that whole clause was because cygwin's dll itself linked with libiberty, so the auto-detect stuff needed an override to make sure the right files were there when you build cygwin1.dll. Otherwise, it would detect that cygwin had strsignal, not build it, then fail later when cygwin1.dll could

Re: m32c, ivopts, 20000412-6.c

2009-01-07 Thread DJ Delorie
> I guess tmp is not short unsigned int * but some other pointer type, > right? But bufend is short unsigned int *? Both are "short unsigned int *" - pointers to shorts. > Can you open a bugzilla for this? It should be not too difficult to track > down the piece of IVOPTs that creates that con

Re: m32c, ivopts, 20000412-6.c

2009-01-07 Thread DJ Delorie
> As I repeatedly said having sizetype of a different precision than > pointer types will cause all sorts of problems ;) And as I've rebutted repeatedly, I can't change the chip. > The middle-end generally assumes it can cast between sizetype and > pointers arbitrarily. Bad assumption. It will

m32c, ivopts, 20000412-6.c

2009-01-06 Thread DJ Delorie
I'm looking a failure for m32c-elf (-mcpu=m32c) in gcc.c-torture/execute/2412-6.c. I've narrowed it down to a transformation done in 107t.ivopts. In 104t.cunroll: (tmp_9 and tmp_16 are 24-bit pointer values): tmp_9 = tmp_16 + 2; if (bufend_6(D) > tmp_9) but in 107t.ivopts: tmp_9 = t

Re: testsuite, simulators, and argv[0]

2008-11-24 Thread DJ Delorie
> OK. Thanks, committed.

Re: testsuite, simulators, and argv[0]

2008-11-24 Thread DJ Delorie
How about this? --- gcc/gcc/gcc/testsuite/gcc.c-torture/execute/pr36321.c 2008-07-23 00:21:31.0 -0400 +++ ./pr36321.c 2008-11-24 13:46:04.0 -0500 @@ -17,7 +17,9 @@ } +static char * volatile argp = "pr36321.x"; + int main(int argc, char **argv) { - foo (argv[0]); + fo

Re: testsuite, simulators, and argv[0]

2008-11-18 Thread DJ Delorie
> I think a more relevant question is whether it's ok to pass 0, {NULL} for > argc, argv. You can do that on desktop linux, you know: execl(some_prog_name, NULL); argv[0] is NOT guaranteed to be non-NULL: ISO/IEC 9899:1999(E) 5.1.2.2.1 2 If they are declared, the parameters to the main

testsuite, simulators, and argv[0]

2008-11-18 Thread DJ Delorie
gcc.c-torture/execute/pr36321.c fails on m32c because the simulator doesn't set argv[0] *and* the simulator has NULL pointer detection: void foo(char *str) { int len2 = strlen (str); . . . int main(int argc, char **argv) { foo (argv[0

Re: GCC 4.4.0 Status Report (2008-11-17)

2008-11-17 Thread DJ Delorie
> How does it fail? Is it related to m32c, ehm, interesting > architectural features (24 bits addresses and only 2 address > registers IIRC)? I think so. The m32c family has such a non-orthogonal register set that there's a lot of small register classes. There are few cases where GENERAL_REGS

Re: GCC 4.4.0 Status Report (2008-11-17)

2008-11-17 Thread DJ Delorie
> What level of 'not support' is that? Is it completely unable to > generate code or are there only testsuite regressions? There's no definition of that macro (that we could find) that lets you build newlib successfully. I can't run the testsuite without newlib.

Re: GCC 4.4.0 Status Report (2008-11-17)

2008-11-17 Thread DJ Delorie
> The old register allocator hasn't been removed yet, but will be > before branching. There are still several targets that haven't been > converted to IRA, so unless they are converted soon, they will be > dropped. The unconverted targets are: > > m32c I'd like to once again point out that des

Re: [ping] Re: m32c: pointer math vs sizetype again

2008-11-14 Thread DJ Delorie
> > Now I'm getting a ton of errors (like, around 5000) that look like this: > > Just remove that assert for testing. Looks good without the assert, 21 new passes and only 1 new failure: PASS-FAIL: gcc.c-torture/execute/loop-ivopts-1.c execution, -O3 -fomit-frame-pointer -funroll-loops

Re: [ping] Re: m32c: pointer math vs sizetype again

2008-11-13 Thread DJ Delorie
> I don't think this is a suitable general solution. Can you instead try the > attached which again tries to simply make sure we sign-extend a sizetype > offset if that is smaller than the pointer mode. Now I'm getting a ton of errors (like, around 5000) that look like this: [ gdb ] up #1 0x08

[ping] Re: m32c: pointer math vs sizetype again

2008-11-12 Thread DJ Delorie
Ping? Is this the right thing to do? I'd like to get this (and a few other m32c bugs) resolved before the next release. > This seems to work, with a suitable extendhipsi2 pattern for m32c: > > Index: expr.c > === > --- expr.c(

Re: global/df dropping a needed set?

2008-11-12 Thread DJ Delorie
Never mind, I figured this one out.

[ping] Re: simplify_subreg vs gen_rtx_SUBREG vis WORDS_BIG_ENDIAN

2008-11-10 Thread DJ Delorie
Ping? http://gcc.gnu.org/ml/gcc/2008-10/msg00491.html

Re: [EMAIL PROTECTED]: Results for 4.4.0 20081106 (experimental) [trunk revision 141636] (GCC) testsuite on m32c-unknown-elf]

2008-11-07 Thread DJ Delorie
> 2008-11-07 Martin Jambor <[EMAIL PROTECTED]> > > * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Do not check > for INDIRECT_REFs. > (forward_propagate_addr_into_variable_array_index): Check that the > offset is not computed from a MULT_EXPR, use is_gimple_assig

Re: [EMAIL PROTECTED]: Results for 4.4.0 20081106 (experimental) [trunk revision 141636] (GCC) testsuite on m32c-unknown-elf]

2008-11-07 Thread DJ Delorie
> My knowledge of backend and RTL in general is very limited and I have > no clue what m32c-elf architecture is and don't seem to have access to > any such system. m32c-elf is one of the many embedded (i.e. cross-compiled) targets which has a simulator. You don't need to have access to physical

[EMAIL PROTECTED]: Results for 4.4.0 20081106 (experimental) [trunk revision 141636] (GCC) testsuite on m32c-unknown-elf]

2008-11-06 Thread DJ Delorie
This new failure seems to have been caused by r141613: +2008-11-05 Martin Jambor <[EMAIL PROTECTED]> + + PR middle-end/37861 + * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Don't turn + pointer arithmetics into array_ref if the array is accessed + through an ind

Re: global/df dropping a needed set?

2008-10-31 Thread DJ Delorie
> For m32c-elf with gcc.c-torture/execute/980707-1.c, global seems to be > deleting a set that's needed to set the exit code - i.e. it's the > first argument to exit(). There's also this suspicious message in the > global dump: More info: I've tracked this back to r138207, the gimple-tuples-bran

global/df dropping a needed set?

2008-10-30 Thread DJ Delorie
For m32c-elf with gcc.c-torture/execute/980707-1.c, global seems to be deleting a set that's needed to set the exit code - i.e. it's the first argument to exit(). There's also this suspicious message in the global dump: changing reg in insn 95 I can't tell if they're changing the pseudo (ok) or

Re: simplify_subreg vs gen_rtx_SUBREG vis WORDS_BIG_ENDIAN

2008-10-27 Thread DJ Delorie
> One thing to do is to call simplify_gen_subreg. I don't know why this > code still calls gen_rtx_SUBREG. It's pretty old code. > > But I don't think that will help. I think this code is simply > incorrect. It seems to assume that op_mode is at least as large as > GET_MODE (xop0), probably b

Re: simplify_subreg vs gen_rtx_SUBREG vis WORDS_BIG_ENDIAN

2008-10-27 Thread DJ Delorie
Ian Lance Taylor <[EMAIL PROTECTED]> writes: > simplify_gen_subreg will only return NULL when the RTL is already > bogus. Be that as it may, but it was returning NULL in my case. (I tried calling simplify_gen_subreg too). The code in expmed.c seemed to be OK with generating bogus subregs, assum

Re: simplify_subreg vs gen_rtx_SUBREG vis WORDS_BIG_ENDIAN

2008-10-27 Thread DJ Delorie
> One thing to do is to call simplify_gen_subreg. As I noted, that may return NULL, which is fatal in the case I'm referencing. > But I don't think that will help. I think this code is simply > incorrect. It seems to assume that op_mode is at least as large as > GET_MODE (xop0), probably becau

simplify_subreg vs gen_rtx_SUBREG vis WORDS_BIG_ENDIAN

2008-10-24 Thread DJ Delorie
In expmed.c I see code like this: if (REG_P (xop0) && GET_MODE (xop0) != op_mode) xop0 = gen_rtx_SUBREG (op_mode, xop0, 0); However, this is wrong for big-endian targets (h8300-elf in my case) because '0' is not the offset of the LSB of the register when it's a pseudo and op_mode i

Re: scan-assembler harness bug?

2008-10-24 Thread DJ Delorie
Committed as attached. Thanks! > Sure. 2008-10-24 DJ Delorie <[EMAIL PROTECTED]> * lib/scanasm.exp (scan-assembler, scan-assembler-not, scan-hidden, scan-not-hidden, scan-file, scan-file-not, scan-assembler-times, scan-assembler-dem, scan-assemble

Re: scan-assembler harness bug?

2008-10-23 Thread DJ Delorie
> OK, after you've run the testsuite with this change. The ChangeLog > entry should show the names of all of the procs you changed. Is gcc.target/i386.exp enough? I originally found it with xstormy16-elf on an older branch, but xstormy16 isn't a happy target in trunk at the moment.

Re: scan-assembler harness bug?

2008-10-23 Thread DJ Delorie
> I thought something like that was already done but I couldn't find it > right now. Is it a problem? If so, we should certainly do this. I see it done in other places, but not scanasm. How's this? 2008-10-23 DJ Delorie <[EMAIL PROTECTED]> * lib/scanasm.exp:

scan-assembler harness bug?

2008-10-23 Thread DJ Delorie
In scanasm.exp we do this: proc scan-assembler { args } { upvar 2 name testcase set output_file "[file rootname [file tail $testcase]].s" However, in dejagnu, $name may have compiler switches appended to it: # We append the compilation flags, if any, to ensure that the test case

<    1   2   3   4   5   6   7   8   >