Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build

From: YunQiang Su <wzssyqa(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build
Date: 2019-06-16 01:46:08
Message-ID: CAKcpw6UTQbWBtHVCnVF_kySTH8iHiPO3ZaTE5+_2gUi1P7BS9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 于2019年6月13日周四 下午10:07写道:
>
> PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> > MIPS r6 changes the encoding of LL/SC instruction,
> > while the .set mips2 will force assembler to generate
> > old encoding.
> > This patch can fix this problem.
>
> So I have a bunch of questions about this patch.
>
> 1. What problem is this actually solving? We have what I think are
> reasonably modern MIPS machines in the buildfarm (frogfish,
> topminnow) and they aren't complaining.
>

Yes. The MIPS r6 is quite new, and the machine that you have should be pre-r6.

> 2. What toolchains define __mips_isa_rev at all? Seems like we could
> be trading one portability issue for another one.
>

It is defined by gcc/llvm.
For gcc:
https://github.com/gcc-mirror/gcc/blob/41d6b10e96a1de98e90a7c0378437c3255814b16/gcc/config/mips/mips.h#L527

> 3. If we actually need something here, don't we need a run-time probe
> rather than a compile-time check? Distro packagers, for example,
> can't assume that their packages will be run on exactly the hardware
> they build on.

We don't think run-time probe is a good idea, since we treat r6 as a
new architectures.
It has it own port of OS, like Debian.
Runtime probe make none sense here.

>
> regards, tom lane

--
YunQiang Su

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message YunQiang Su 2019-06-16 01:49:28 Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build
Previous Message Tom Lane 2019-06-15 16:43:33 Re: BUG #15853: DROP TABLE CASCADE drops sequence that other tables depend on