i370 - negative indexes

2018-05-05 Thread Paul Edwards

Hi.

On the i370 port of GCC 3.2.3, I am
getting the following issue.


This code:

C:\scratch\bug>type bug.c
const char *p;

void foo(void)
{
   printf("p-1 is %x\n", p[-1]);
}


generates:

...
L 2,=F'-1'
...
IC4,0(2,3)

ie it is using a value of x’’ in R2 as an index.

This works fine in AM24 and AM31 environments, but
fails for AM64 where an address above 4 GiB is
computed.

Such code is very rare, so I would like to just have
a rule that the index must always be a positive
value, and for negative indexes like the above,
different code is generated to do an actual
subtract instead of trying to do everything via
the index.

Any idea how to achieve that? I can't see
anywhere in i370.md where I can put some
sort of constraint.

Note that I am producing 32-bit modules, but
setting them to AM64 so that they can use
the full 4 GiB on certain environments (like
MVS/380), instead of having a 2 GiB limit.

Thanks. Paul.


---
This email has been checked for viruses by AVG.
http://www.avg.com



【GCC version can not be changed】

2018-05-05 Thread 夏晗
root@Xia-Ubuntu:/usr/bin# gcc -v
使用内建 specs。
COLLECT_GCC=gcc
目标:x86_64-pc-linux-gnu
配置为:../configure -enable-checking=release -enable-languages=c,c++ 
-disable-multilib
线程模型:posix
gcc 版本 6.2.0 (GCC) 
I have tried many methods like 'ln' and priority changing, but 'gcc -v' still 
maintain at '6.2.0'...






Re: 【GCC version can not be changed】

2018-05-05 Thread carl hansen
On Sat, May 5, 2018 at 5:13 AM, 夏晗  wrote:

> root@Xia-Ubuntu:/usr/bin# gcc -v
> 使用内建 specs。
> COLLECT_GCC=gcc
> 目标:x86_64-pc-linux-gnu
> 配置为:../configure -enable-checking=release -enable-languages=c,c++
> -disable-multilib
> 线程模型:posix
> gcc 版本 6.2.0 (GCC)
> I have tried many methods like 'ln' and priority changing, but 'gcc -v'
> still maintain at '6.2.0'.


​perhaps
which -a gcc
will provide a clue​


random_device implementation

2018-05-05 Thread sotrdg sotrdg
https://github.com/euloanty/mingw-std-random_device/blob/master/random_device_gcc_withcxx11abi/random.cc

Sent from Mail for Windows 10