Re: Branch instructions that depend on target distance

2020-02-24 Thread Jeff Law
On Mon, 2020-02-24 at 12:36 +0100, Petr Tesarik wrote: > On Mon, 24 Feb 2020 11:14:44 + > Jozef Lawrynowicz wrote: > > > On Mon, 24 Feb 2020 12:05:28 +0100 > > Petr Tesarik wrote: > > > > > Hi all, > > > > > > I'm looking into reviving the efforts to port gcc to VideoCore IV [1]. > > >

Re: Branch instructions that depend on target distance

2020-02-24 Thread Petr Tesarik
On Mon, 24 Feb 2020 15:03:21 +0300 (MSK) Alexander Monakov wrote: > On Mon, 24 Feb 2020, Andreas Schwab wrote: > > > On Feb 24 2020, Petr Tesarik wrote: > > > > > On Mon, 24 Feb 2020 12:29:40 +0100 > > > Andreas Schwab wrote: > > > > > >> On Feb 24 2020, Petr Tesarik wrote: > > >> > >

Re: Branch instructions that depend on target distance

2020-02-24 Thread Julian Brown
On Mon, 24 Feb 2020 15:03:21 +0300 (MSK) Alexander Monakov wrote: > On Mon, 24 Feb 2020, Andreas Schwab wrote: > > > On Feb 24 2020, Petr Tesarik wrote: > > > > > On Mon, 24 Feb 2020 12:29:40 +0100 > > > Andreas Schwab wrote: > > > > > >> On Feb 24 2020, Petr Tesarik wrote: > > >> > >

Re: Branch instructions that depend on target distance

2020-02-24 Thread Alexander Monakov
On Mon, 24 Feb 2020, Andreas Schwab wrote: > On Feb 24 2020, Petr Tesarik wrote: > > > On Mon, 24 Feb 2020 12:29:40 +0100 > > Andreas Schwab wrote: > > > >> On Feb 24 2020, Petr Tesarik wrote: > >> > >> > This works great ... until there's some inline asm() statement, for > >> > which gcc

Re: Branch instructions that depend on target distance

2020-02-24 Thread Andreas Schwab
On Feb 24 2020, Petr Tesarik wrote: > On Mon, 24 Feb 2020 12:29:40 +0100 > Andreas Schwab wrote: > >> On Feb 24 2020, Petr Tesarik wrote: >> >> > This works great ... until there's some inline asm() statement, for >> > which gcc cannot keep track of the length attribute, so it is probably >> >

Re: Branch instructions that depend on target distance

2020-02-24 Thread Andrew Stubbs
On 24/02/2020 11:05, Petr Tesarik wrote: Hi all, I'm looking into reviving the efforts to port gcc to VideoCore IV [1]. One issue I've run into is the need to find out target branch distance at compile time. I looked around, and it's not the first one architecture with such requirement, but

Re: Branch instructions that depend on target distance

2020-02-24 Thread Petr Tesarik
On Mon, 24 Feb 2020 12:29:40 +0100 Andreas Schwab wrote: > On Feb 24 2020, Petr Tesarik wrote: > > > This works great ... until there's some inline asm() statement, for > > which gcc cannot keep track of the length attribute, so it is probably > > taken as zero. > > GCC computes it by

Re: Branch instructions that depend on target distance

2020-02-24 Thread Petr Tesarik
On Mon, 24 Feb 2020 11:14:44 + Jozef Lawrynowicz wrote: > On Mon, 24 Feb 2020 12:05:28 +0100 > Petr Tesarik wrote: > > > Hi all, > > > > I'm looking into reviving the efforts to port gcc to VideoCore IV [1]. > > One issue I've run into is the need to find out target branch distance > > at

Re: Branch instructions that depend on target distance

2020-02-24 Thread Andreas Schwab
On Feb 24 2020, Petr Tesarik wrote: > This works great ... until there's some inline asm() statement, for > which gcc cannot keep track of the length attribute, so it is probably > taken as zero. GCC computes it by counting the number of asm insns. You can use ADJUST_INSN_LENGTH to adjust this

Re: Branch instructions that depend on target distance

2020-02-24 Thread Jozef Lawrynowicz
On Mon, 24 Feb 2020 12:05:28 +0100 Petr Tesarik wrote: > Hi all, > > I'm looking into reviving the efforts to port gcc to VideoCore IV [1]. > One issue I've run into is the need to find out target branch distance > at compile time. I looked around, and it's not the first one > architecture with

Branch instructions that depend on target distance

2020-02-24 Thread Petr Tesarik
Hi all, I'm looking into reviving the efforts to port gcc to VideoCore IV [1]. One issue I've run into is the need to find out target branch distance at compile time. I looked around, and it's not the first one architecture with such requirement, but AFAICS it has never been solved properly. For