Re: RFA: RL78: Scan inside PARALLELs when looking for dead code

2015-01-20 Thread DJ Delorie
Here is a small patch to fix a code-gen problem for the RL78. The bug was that the register death pass was not looking inside PARALLELs, and thus missing some USE and SET cases. I considered adding code to scan all of the elements in the PARALLEL, but the only ones that can be

Re: Fix a MinGW warning in libiberty/strerror.c

2015-01-16 Thread DJ Delorie
Thanks. Do I need to hear from someone else approving this, or can I go ahead and commit? Go ahead and commit.

[rl78] Various fixes and tweaks

2015-01-16 Thread DJ Delorie
Various RL78-specific fixes and tweaks wrt volatiles and addressing modes. Committed. * config/rl78/rl78-real.md (addqi3_real): Allow volatiles. (addhi3_real): Likewise. Fix [HL+0] syntax. (subqi3_real): Likewise. (subhi3_real): Likewise.

Re: volatile access optimization (C++ / x86_64)

2015-01-05 Thread DJ Delorie
Ok, but the converse — if the general_operand is accessed by more than one instruction, it is not safe — is correct, right? In general, I'd agree, but the ISO spec talks about sequence points and there are times when you *can* access a volatile multiple times as long as the state is correct at

Re: volatile access optimization (C++ / x86_64)

2015-01-05 Thread DJ Delorie
Matt Godbolt m...@godbolt.org writes: GCC's code generation uses a load; add; store for volatiles, instead of a single add 1, [metric]. GCC doesn't know if a target's load/add/store patterns are volatile-safe, so it must avoid them. There are a few targets that have been audited for

Re: volatile access optimization (C++ / x86_64)

2015-01-05 Thread DJ Delorie
What is involved with the auditing? Each pattern that (directly or indirectly) uses general_operand, memory_operand, or nonimmediate_operand needs to be checked to see if it's volatile-safe. If so, you need to change the predicate to something that explicitly accepts volatiles. There's been

Re: volatile access optimization (C++ / x86_64)

2015-01-05 Thread DJ Delorie
One question: do you have an example of a non-volatile-safe machine so I can get a feel for the problems one might encounter? At best I can imagine a machine that optimizes add 0, [mem] to avoid the read/write, but I'm not aware of such an ISA. For example, the MSP430 backend uses a macro

Re: volatile access optimization (C++ / x86_64)

2015-01-05 Thread DJ Delorie
I looked in the documentation and didn’t see this described. AFAIK it's not documented. Only recently was it agreed (and even then, reluctantly) that the ISO spec could be met by such opcodes.

Re: volatile access optimization (C++ / x86_64)

2015-01-05 Thread DJ Delorie
To try to generalize from that: it looks like the operating principle is that an insn that expands into multiple references to a given operand isn’t volatile-safe, but one where there is only a single reference is safe? No, if the expanded list of insns does what the standard says, no more,

[rl78] Remove unneeded SHORT_IMMEDIATES_SIGN_EXTEND

2014-12-15 Thread DJ Delorie
The code that this macro enables will never do anything anyway on RL78. Applied. 2014-12-15 DJ Delorie d...@redhat.com * config/rl78/rl78.h: Remove SHORT_IMMEDIATES_SIGN_EXTEND. Index: config/rl78/rl78.h === --- config

Re: attribute handler oddness in MEP and STORMY16 ports

2014-12-02 Thread DJ Delorie
My memories of why I did MeP the way I did are... vague. I recall it had to do with getting the attributes to apply to C++ objects correctly, since C++ objects tend to be complicated and gcc didn't always pass me what I expected. think they are suppose to. They build, but I cant test them...

[m32c] tweaks to EH, cond, etc

2014-11-06 Thread DJ Delorie
Fixes newlib/libgcc build problems, many test cases. No regressions. Applied. * config/m32c/cond.md (movqicc_code_mode): Remove mode of conditional. (movhicc_code_mode): Likewise. * config/m32c/m32c.c (encode_pattern_1): Specialise PSImode subregs.

Re: libgcc - SJLJ probe failing on head on h8300 m32c

2014-11-05 Thread DJ Delorie
Last time you mentioned this, I asked what the contents of that config.log were...

Re: fix math wrt volatile-bitfields vs C++ model

2014-10-31 Thread DJ Delorie
Ok. For the branch please wait until after 4.9.2 is out. 4.9.2 being out, I applied this to the branch.

Re: fix math wrt volatile-bitfields vs C++ model

2014-10-29 Thread DJ Delorie
Ok. For the branch please wait until after 4.9.2 is out. Thanks! Committed to trunk.

Re: fix math wrt volatile-bitfields vs C++ model

2014-10-28 Thread DJ Delorie
, x86 32/64, and arm32. 2014-10-29 DJ Delorie d...@redhat.com * expmed.c (strict_volatile_bitfield_p): Fix off-by-one error. 2014-10-29 DJ Delorie d...@redhat.com * gcc.dg/20141029-1.c: New. Index: expmed.c

Re: [pr/63582] Don't even store __int128 types if not supported.

2014-10-27 Thread DJ Delorie
Fixed PR/63582. Tested with no regressions on x86-64 and ix86. Ok? * tree.c (build_common_tree_nodes): Don't even store the __int128 types if they're not supported. OK. Thanks! Committed.

Re: [mep] RFA: Use new rtl iterators in global_reg_mentioned_p

2014-10-25 Thread DJ Delorie
* config/mep/mep.c: Include rtl-iter.h. (global_reg_mentioned_p_1): Take a const_rtx and return a bool. (xtensa_tls_referenced_p): Return a bool. Use FOR_EACH_SUBRTX. OK.

Re: [mep] RFA: Use new rtl iterators in mep_store_find_set

2014-10-25 Thread DJ Delorie
* config/mep/mep.c (mep_store_find_set): Take a const_rtx and return a bool. Replace void * with specific type. Iterate over all subrtxes. (mep_store_data_bypass_1): Update calls accordingly. OK.

Re: [mep] RFA: Use new rtl iterators in mep_mul_hilo_bypass_p

2014-10-25 Thread DJ Delorie
gcc/ * config/mep/mep.c (mep_mul_hilo_bypass_1): Delete. (mep_mul_hilo_bypass_p): Use FOR_EACH_SUBRTX. OK.

[pr/63582] Don't even store __int128 types if not supported.

2014-10-24 Thread DJ Delorie
Fixed PR/63582. Tested with no regressions on x86-64 and ix86. Ok? * tree.c (build_common_tree_nodes): Don't even store the __int128 types if they're not supported. Index: tree.c === --- tree.c (revision

[msp430] fix X suffix

2014-10-23 Thread DJ Delorie
Fixes BISX.A bug. Committed. 2014-10-23 DJ Delorie d...@redhat.com * config/msp430/msp430.c (msp430_print_operand): 'x' modifier is independend of -mlarge. * config/msp430/constraints.md (Ys): Update comment. Index: config/msp430/constraints.md

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-16 Thread DJ Delorie
This is okay. Thanks! Committed.

Re: [flag-types.h] don't assume 32-bit ints

2014-10-16 Thread DJ Delorie
With a ChangeLog entry yes. Thanks! Committed.

Re: [lto] don't assume pointer size

2014-10-16 Thread DJ Delorie
In the event that pointer sizes aren't powers of two, choose a more suitable alignment than (unsigned)(-1), which results in HUGE file sizes. Ok? Ok. Thanks! Committed.

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-16 Thread DJ Delorie
FAIL: g++.dg/init/enum1.C -std=gnu++11 (test for errors, line 12) FAIL: g++.dg/init/enum1.C -std=gnu++1y (test for errors, line 12) FAIL: g++.dg/init/enum1.C -std=gnu++98 (test for errors, line 12) That used to complain about enum1.C:12:1: error: no integral type can represent all of

Re: [PATCH 1/5] libiberty: Expose choose_tmpdir, and fix constness of return type

2014-10-15 Thread DJ Delorie
As long as you commit to gcc first, or at the same time as other commits, you'll be fine. If you commit elsewhere first or only, it may be reverted by a script.

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-15 Thread DJ Delorie
If you could implement the second option, it would be appreciated. Could you please test this for me? It builds as a powerpc-elf cross-compiler (at least the host half) but I don't have a power machine here to test on. Index: rs6000-c.c

[lto] don't assume pointer size

2014-10-15 Thread DJ Delorie
In the event that pointer sizes aren't powers of two, choose a more suitable alignment than (unsigned)(-1), which results in HUGE file sizes. Ok? Index: gcc/lto/lto-object.c === --- gcc/lto/lto-object.c(revision 216287) +++

[flag-types.h] don't assume 32-bit ints

2014-10-15 Thread DJ Delorie
Since flag-types.h is used in target code, it needs to be -Wall-safe for targets with 16-bit int. OK? Index: gcc/flag-types.h === --- gcc/flag-types.h(revision 216287) +++ gcc/flag-types.h(working copy) @@ -229,17 +229,17

[pointer size] more edge cases

2014-10-15 Thread DJ Delorie
A few more cases where pointers were assumed to be whole bytes. Ok? Index: gcc/c-family/c-cppbuiltin.c === --- gcc/c-family/c-cppbuiltin.c (revision 216287) +++ gcc/c-family/c-cppbuiltin.c (working copy) @@ -668,13 +668,13 @@

Re: [pointer size] more edge cases

2014-10-15 Thread DJ Delorie
I don't see what the stor-layout.c changes have to do with that description, or why they are correct (they look wrong to me; the existing addition of BITS_PER_UNIT_LOG + 1 looks logically correct for bitsizetype). sooo... the type for bitsizetype will *always* be a bigger type than sizetype?

Re: [pointer size] more edge cases

2014-10-15 Thread DJ Delorie
The other changes are OK. Committed those then. Thanks!

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-14 Thread DJ Delorie
extensions. Is this OK? If so, is there anything else, or can I check the whole mess in yet? Go ahead. Thanks! Committed.

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-14 Thread DJ Delorie
../../gcc/gcc/config/rs6000/rs6000-c.c:237:24: error: ‘RID_INT128’ was not declared in this scope Two options: 1. If you know the RS6000 will never have any __intN other than __int128, just use RID_INT_N_0, although this is a hack it will work as long as there *is* an __int128 for

Re: __intN patch 5/5: msp430-specific changes

2014-10-14 Thread DJ Delorie
This is the MSP430-specific use of the new intN framework to enable true 20-bit pointers. Since I'm one of the MSP430 maintainers, this patch is being posted for reference, not for approval. Now that the other parts are committed, I'm checking this one in too. gcc/config/msp430 *

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-13 Thread DJ Delorie
This is what I ended up with for the test case. It was a bit tricky since it only works with msp430x (not msp430) and requires the gnu extensions. Is this OK? If so, is there anything else, or can I check the whole mess in yet? // { dg-do compile { target msp430*-*-* } } // { dg-options

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-08 Thread DJ Delorie
if (same_type_p (TYPE_MAIN_VARIANT (t1), long_long_unsigned_type_node) || same_type_p (TYPE_MAIN_VARIANT (t2), long_long_unsigned_type_node)) return build_type_attribute_variant (long_long_unsigned_type_node,

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-04 Thread DJ Delorie
Otherwise, I don't see what moving the test would accomplish. If long is never 128 bits, it doesn't matter if the int128 test is before or after it, and the other intN are never the same size as standard types, I don't see how you can assert that these will never happen. It's checked

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-03 Thread DJ Delorie
Note that there is a separate __int128_t type that isn't part of the standard extension. Maybe it's there for that type? Otherwise, I don't see what moving the test would accomplish. If long is never 128 bits, it doesn't matter if the int128 test is before or after it, and the other intN are

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-02 Thread DJ Delorie
The C++ standard says that extended integer types participate in the usual arithmetic conversions. If I add a 32-bit int and an __int48, the usual arithmetic conversions should convert the int to __int48. Except the code you're referring to isn't part of that conversion. It only handles

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-02 Thread DJ Delorie
Ah, good point. In which case I don't see what this code is trying to accomplish relative to falling through to the prefer the unsigned one code below. Shall we just remove it? I don't know for sure. There was __int128 code there, I replaced it with the same code, so as to avoid any

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-02 Thread DJ Delorie
The test would only pass for msp430x (and fail for msp430, which is the same target back-end). Do I need to redo the big patch, or would a separate one suffice? Separate is fine. Turns out it's mangled like this: __int20 foo (__int20 a, unsigned __int20 b); _Z3foou5int20u6uint20

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-10-01 Thread DJ Delorie
It seems like the int128 code here was broken and this is continuing that brokenness. Extended integer types have integer conversion rank corresponding to their bitsize, so int128 should have higher rank than long long, but here it was being checked after long long, and your code also

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-09-30 Thread DJ Delorie
Joseph S. Myers jos...@codesourcery.com wrote: The non-C++/libstdc++ parts are OK with those changes. Jonathan Wakely jwak...@redhat.com wrote: * libstdc++-v3/ * src/c++11/limits.cc: Add support for __intN types. * include/std/type_traits: Likewise. * include/std/limits:

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-09-30 Thread DJ Delorie
Joseph S. Myers jos...@codesourcery.com wrote: The non-C++/libstdc++ parts are OK with those changes. Jonathan Wakely jwak...@redhat.com wrote: These libstdc++ changes are OK for trunk. Jason/Nathan, Could one of you two please review the remaining C++ parts (cp/*) ?

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-09-29 Thread DJ Delorie
Just one question about the include/std/limits changes below. It seems that __glibcxx_signed_b isn't strictly necessary as it doesn't use the B argument, so is it just there for consistency? Yup.

[msp430] fix RLAM opcodes

2014-09-12 Thread DJ Delorie
This fixes cases where negative indices are used for array offsets. Committed. * config/msp430/msp430.md (extendhipsi2): Use 20-bit form of RLAM/RRAM. (extend_and_shift1_hipsi2): Likewise. (extend_and_shift2_hipsi2): Likewise. Index: gcc/config/msp430/msp430.md

Re: [msp430] fix RLAM opcodes

2014-09-12 Thread DJ Delorie
This fixes cases where negative indices are used for array offsets. Committed. * config/msp430/msp430.md (extendhipsi2): Use 20-bit form of RLAM/RRAM. (extend_and_shift1_hipsi2): Likewise. (extend_and_shift2_hipsi2): Likewise. Committed to 4.9 branch too.

Re: [PATCH 0/5] Yet more use of rtx subclasses; possible rl78 bug

2014-09-09 Thread DJ Delorie
I fixed this (in patch 5) by introducing a new local rtx set for the result of single_set, and hence not overwriting insn within the loop. That said I've only tested that it compiles for rl78, I've not yet forced line 3605 to execute, and not simulated the resulting code. Seems

Re: [msp430] add missing option documentation

2014-09-08 Thread DJ Delorie
Minor bit of docs for an msp430 option. OK for trunk and 4.9 branch? Ok. * doc/invoke.texi (MSP430 Options): Add -minrt. Thanks! Committed.

[msp430] add missing option documentation

2014-09-05 Thread DJ Delorie
Minor bit of docs for an msp430 option. OK for trunk and 4.9 branch? * doc/invoke.texi (MSP430 Options): Add -minrt. Index: doc/invoke.texi === --- doc/invoke.texi (revision 214976) +++ doc/invoke.texi (working

Re: __intN patch 2/5: Fix assumptions about mode precisions

2014-08-29 Thread DJ Delorie
On 08/13/14 16:10, DJ Delorie wrote: The purpose of this set of changes is to remove assumptions in GCC about type sizes. Previous to this patch, GCC assumed that all types were powers-of-two in size, and used naive math accordingly. Old: POINTER_SIZE / BITS_PER_UNIT

Re: __intN patch 4/5: testsuite updates

2014-08-29 Thread DJ Delorie
* testsuite/ * lib/target-supports.exp (check_effective_target_size32plus): Increase size to avoid false positives on 24-bit address spaces. * gcc.c-torture/compile/limits-stringlit.c: Skip if msp430. * gcc.dg/lto/pr54709_1.c: Fix memcpy prototype. *

Re: __intN patch 1/5: convert-move optimization

2014-08-29 Thread DJ Delorie
* expr.c (convert_move): If the target has an explicit converter, use it. OK. Thanks! Committed.

Re: __intN patch 2/5: Fix assumptions about mode precisions

2014-08-29 Thread DJ Delorie
gcc/ * cppbuiltin.c (define_builtin_macros_for_type_sizes): Round pointer size up to a power of two. * defaults.h (DWARF2_ADDR_SIZE): Round up. (POINTER_SIZE_UNITS): New, rounded up value. * dwarf2asm.c (size_of_encoded_value): Use it.

push_rounding vs memcpy vs stack_pointer_delta

2014-08-28 Thread DJ Delorie
The m32c-elf with -mcpu=m32c has a word-aligned stack and uses pushes for arguments (i.e. not accumulate_outgoing_args). In this test case, one of the arguments is memcpy'd into place, and an assert fails: typedef struct { int a, b, c, d, e, f, g, h; } foo; int x; void dj (int a, int b, foo

Re: [BUILDROBOT][PATCH] Fix warnings in the mep-elf target

2014-08-28 Thread DJ Delorie
This patch should fix it. Okay to apply? Ok. Thanks! 2014-08-28 Jan-Benedict Glaw jbg...@lug-owl.de * config/mep/mep-pragma.c (mep_pragma_coprocessor_subclass): Rework to silence warning. * config/mep/mep.c (VECTOR_TYPE_P): Remove duplicate definition.

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-08-22 Thread DJ Delorie
Maybe you need to refactor __glibcxx_digits so there is a version taking the bitsize as an argument rather than using sizeof(T) * __CHAR_BIT__, but that should be the only change needed to handle such types with the existing macros. The bitsize macros should be the only ones

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-08-22 Thread DJ Delorie
I don't see flag_iso as relevant here (since the macros are in the implementation namespace). The definitions could reasonably be restricted to c_dialect_cxx (), though, given that they are specifically for use by libstdc++ (and it's easier to add a macro later for C if needed, than to

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-08-21 Thread DJ Delorie
Why are types only entered in integer_types if wider than long long? IIRC it was so that TImode (__int128) could get into the array (it was there before) without adding the other smaller types, which (I think) don't need to be in there. I don't recall why they're left out, but... ah, I

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-08-21 Thread DJ Delorie
I don't see any corresponding HOST_BITS_PER_WIDE_INT test for __int128 being removed (and anyway HOST_BITS_PER_WIDE_INT is now always 64, so such a test for __int128 would be dead code). It was there when I started the patch, honest! :-) Removed ;-) For each __intN we need to provide

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-08-21 Thread DJ Delorie
Maybe you need to refactor __glibcxx_digits so there is a version taking the bitsize as an argument rather than using sizeof(T) * __CHAR_BIT__, but that should be the only change needed to handle such types with the existing macros. The bitsize macros should be the only ones needing

[rl78] allow const-far moves

2014-08-14 Thread DJ Delorie
Minor tweak, committed. * config/rl78/rl78-virt.md (movhi_virt): Allow const-far moves. Index: config/rl78/rl78-virt.md === --- config/rl78/rl78-virt.md(revision 213994) +++ config/rl78/rl78-virt.md(working copy) @@

[rl78] disable umul for G10

2014-08-14 Thread DJ Delorie
The G10 family doesn't support this opcode. Committed. * config/rl78/rl78-expand.md (umulqihi3): Disable for G10. * config/rl78/rl78-virt.md (umulhi3_shift_virt): Likewise. (umulqihi3_virt): Likewise. * config/rl78/rl78-real.md (umulhi3_shift_real): Likewise.

[rl78] split mem-mem moves

2014-08-14 Thread DJ Delorie
Letting GCC think that any mem-mem alternative is OK leads to trouble with far mem to far mem moves, so split out the moves we can make. Committed. * config/rl78/predicates.md (rl78_near_mem_operand): New. * config/rl78/rl78-virt.md (movqi_virt_mm, movqi_virt)

[rl78] allow global+acc

2014-08-14 Thread DJ Delorie
Minor optimization. Committed. * config/rl78/rl78-real.md (addqi3_real): Allow adding global variables to the accumulator. Index: config/rl78/rl78-real.md === --- config/rl78/rl78-real.md(revision 213996) +++

__intN patch 0/5: summary

2014-08-13 Thread DJ Delorie
The following five patches are the latest in my ongoing work to replace the hard-coded __int128 type with a more flexible __intN system that allows target-specific types that correspond to partial-int modes. Specifically, this will allow targets to have pointers that aren't powers-of-two in

__intN patch 1/5: convert-move optimization

2014-08-13 Thread DJ Delorie
This patch is part of the __intN series, but is independent. It provides an additional optimization opportunity, since the MSP430 does a lot of conversions between HImode and PSImode. * expr.c (convert_move): If the target has an explicit converter, use it. Index: gcc/expr.c

__intN patch 2/5: Fix assumptions about mode precisions

2014-08-13 Thread DJ Delorie
The purpose of this set of changes is to remove assumptions in GCC about type sizes. Previous to this patch, GCC assumed that all types were powers-of-two in size, and used naive math accordingly. Old: POINTER_SIZE / BITS_PER_UNIT TYPE_SIZE GET_MODE_BITSIZE New:

__intN patch 5/5: msp430-specific changes

2014-08-13 Thread DJ Delorie
This is the MSP430-specific use of the new intN framework to enable true 20-bit pointers. Since I'm one of the MSP430 maintainers, this patch is being posted for reference, not for approval. gcc/config/msp430 * config/msp430/msp430-modes.def (PSI): Add. *

__intN patch 4/5: testsuite updates

2014-08-13 Thread DJ Delorie
Changes to the testsuite to make tests more portable to targets with unusual address spaces. * testsuite/ * lib/target-supports.exp (check_effective_target_size32plus): Increase size to avoid false positives on 24-bit address spaces. *

Re: __intN patch 3/5: main __int128 - __intN conversion.

2014-08-13 Thread DJ Delorie
A while ago I've removed a couple of those 'typedef struct' things, as they are not required in C++ anymore. Is there any particular reason why this couldn't be simply 'struct int_n_data_t' ? No particular reason.

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-12 Thread DJ Delorie
Ah, cool, I didn't know all that was in. Well, the precision part is in, but the __intN part isn't yet. Each time I do a final check for regressions, something new has been added to gcc which breaks it all again... :-P

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread DJ Delorie
As for PSImode, I dunno - seems only m32c and AVR use that? I have no way how to perform testing on such targets. and msp430. m32c and msp430 have simulators in gdb.

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread DJ Delorie
Responding wrt DJ's proposed changes: As to what bits are modified, that's target dependent as the precise size of the partial modes is target dependent. GET_MODE_PRECISION (mode) is the precision of all modes. True, but not all the compiler uses that info when it should. There are even

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread DJ Delorie
There's still lots of places in gcc that use SIZE where they should use PRECISION. Yes, and in time, they’ll all get cleaned up. Hopefully not much time, if I can get my patches commit-worthy. I'm actually debugging a pointer-signed-math regression now. I also added a step that looks

Re: [cygming] make sure libgcc logic is consistent

2014-07-24 Thread DJ Delorie
sorry for late reply. Patch is ok. Please apply. Applied. Thanks!

[cygming] make sure libgcc logic is consistent

2014-07-22 Thread DJ Delorie
This patch changes the logic in crtbegin that looks for libgcc.dll such that the test is only done once, guaranteeing consistent results between the register and deregister cases. Previously, a crash occurred if the application (directly or indirectly) caused libgcc.dll to load after main() was

Re: m32c-*-* Build Issue (Multilib?)

2014-07-17 Thread DJ Delorie
I just tried a 4.9.1 build and got this error: configure:4222: checking whether to use setjmp/longjmp exceptions configure:: /greed/dj/gnu/gcc/m32c-elf/gcc-4_9-branch/./gcc/xgcc -B/greed/dj/gnu/gcc/m32c-elf/gcc-4_9-branch/./gcc/ -B/greed/dj/m32c/install/m32c-elf/bin/

Re: m32c-*-* Build Issue (Multilib?)

2014-07-17 Thread DJ Delorie
We see other failures in the log because newlib/targ-include isn't created. The rtems build include path includes that and needs it but it isn't created before libgcc is built. That isn't a problem on other targets. I don't see anything odd in the top configurery magic for m32c which could

Re: m32c-*-* Build Issue (Multilib?)

2014-07-17 Thread DJ Delorie
What's the next step? Someone finds time and desire to debug it ;-)

[rx] fix some alignment constants

2014-07-16 Thread DJ Delorie
Minor bugfix, committed. * config/rx/rx.c (rx_option_override): Fix alignment values. (rx_align_for_label): Likewise. Index: config/rx/rx.c === --- config/rx/rx.c (revision 212709) +++ config/rx/rx.c

Re: [patch 1/4] change specific int128 - generic intN

2014-07-11 Thread DJ Delorie
PSImode is 20 bits, fits in a 20 bit register, and uses 20 bit operations. Then why do you need this change? Because parts of the gcc code use the byte size instead of the bit size, or round up, or assume powers-of-two sizes. - TYPE_SIZE (type) = bitsize_int (GET_MODE_BITSIZE

Re: [patch 1/4] change specific int128 - generic intN

2014-07-10 Thread DJ Delorie
which means that the precision of the mode is used to set the size of the type, which very likely means that the size of the mode is larger. So the size of the mode will be larger than the size of the type, which is a lie. For partial int modes, the precision and size are the same, and

Re: reverse bitfield patch

2014-07-07 Thread DJ Delorie
Ok, but as we are dealing exclusively with bitfields there is already output_constructor_bitfield which uses an intermediate state to pack bits into units that are then emitted. It shouldn't be hard to change that to make it pack into the appropriate bits instead. That assumes that the

Re: [patch 1/4] change specific int128 - generic intN

2014-07-07 Thread DJ Delorie
I'm very skeptical... In any case, having a type whose TYPE_SIZE is smaller than the size of its MODE is a lie which will bite you back at some point. Except gcc now knows the size of partial int modes. In this case, PSImode is 20 bits and TYPE_SIZE is 20 bits, so they match. The code was

Re: [patch 1/4] change specific int128 - generic intN

2014-07-03 Thread DJ Delorie
And the hardware really loads 20 bits and not 24 bits? If so, I think you might want to consider changing the unit to 4 bits instead of 8 bits. If no, the mode is padded and has 24-bit size so why is setting TYPE_PRECISION to 20 not sufficient to achieve what you want? The hardware

Re: [patch 1/4] change specific int128 - generic intN

2014-07-03 Thread DJ Delorie
That's what'll need fixing then. Can I change TYPE_SIZE to TYPE_SIZE_WITH_PADDING then? Because it's not reflecting the type's size any more. Why do we have to round up a type's size anyway? That's a pointless assumption *unless* you're allocating memory space for it, and in that case, you

Re: [patch 1/4] change specific int128 - generic intN

2014-07-02 Thread DJ Delorie
Do you have modes whose size is not multiple of the unit? Yes. That's exactly the problem I'm trying to solve here. I'm making partial int modes have real corresponding types, and they can be any bit size, with target PS*modes to match. The MSP430, for example, has 20-bit modes, 20-bit

Re: reverse bitfield patch

2014-07-01 Thread DJ Delorie
Revisiting an old thread, as I still want to get this feature in... https://gcc.gnu.org/ml/gcc/2012-10/msg00099.html Why do you need to change varasm.c at all? The hunks seem to be completely separate of the attribute. Because static constructors have fields in the original order, not

Re: [patch 1/4] change specific int128 - generic intN

2014-06-30 Thread DJ Delorie
If you find a particular use of TYPE_SIZE is using a size that isn't correct for your type whose precision is not a multiple of BITS_PER_UNIT, then in my model the correct fix is to change that use of TYPE_SIZE rather than to change the value of TYPE_SIZE for that type - and such a change

Re: Unreviewed build patch

2014-06-27 Thread DJ Delorie
https://gcc.gnu.org/ml/gcc-patches/2014-05/msg01860.html Build parts are approved.

Re: [patch 1/4] change specific int128 - generic intN

2014-06-27 Thread DJ Delorie
No stor-layout.c listed here but... I knew I'd miss at least one in the split-up... Index: gcc/stor-layout.c === --- gcc/stor-layout.c (revision 211858) +++ gcc/stor-layout.c (working copy) @@ -2123,13

Re: [patch 1/4] change specific int128 - generic intN

2014-06-27 Thread DJ Delorie
Are you proposing we remove TYPE_SIZE completely?

Re: [patch 1/4] change specific int128 - generic intN

2014-06-27 Thread DJ Delorie
Yes; I think that makes sense, unless someone produces a clearer definition of what TYPE_SIZE means that isn't redundant. Does TYPE_SIZE have a different meaning than TYPE_PRECISION for non-integer types? Floats, vectors, complex?

Re: [Patch: RL78] Add support for 64-bit doubles

2014-06-25 Thread DJ Delorie
The RX toolchain has a similar patch where the option is doubles while the folder name is double. There's no reason for one toolchain to be consistent with another, though. Would it be ok to revert this line from 64-bit-doubles to 64-bit-double as this? +MULTILIB_DIRNAMES = g10

Re: [patch 1/4] change specific int128 - generic intN

2014-06-24 Thread DJ Delorie
Part 1 of 4, split from the full patch. The purpose of this set of changes is to remove assumptions in GCC about type sizes. Previous to this patch, GCC assumed that all types were powers-of-two in size, and used naive math accordingly. Old: POINTER_SIZE / BITS_PER_UNIT

Re: [patch 3/4] change specific int128 - generic intN

2014-06-24 Thread DJ Delorie
Part 3 of 4, split from the full patch. Additional optimization opportunity, since the MSP430 does a lot of conversions between HImode and PSImode. gcc/ * expr.c (convert_move): If the target has an explicit converter, use it. Index: gcc/expr.c

Re: [patch 4/4] change specific int128 - generic intN

2014-06-24 Thread DJ Delorie
Part 4 of 4, split from the full patch. This is the MSP430-specific use of the new intN framework to enable true 20-bit pointers. Since I'm one of the MSP430 maintainers, this patch is being posted for reference, not for approval. gcc/config/msp430 * config/msp430/msp430-protos.h

<    1   2   3   4   5   6   7   8   9   10   >