- Notifications
You must be signed in to change notification settings - Fork28
Commit40dde82
committed
Fix spinlock assembly code for MIPS so it works on MIPS r6.
Original MIPS-I processors didn't have the LL/SC instructions (nor anyother userland synchronization primitive). If the build toolchaintargets that ISA variant by default, as an astonishingly large fractionof MIPS platforms still do, the assembler won't take LL/SC withoutcoercion in the form of a ".set mips2" instruction. But we issued thatunconditionally, making it an ISA downgrade for chips later than MIPS2.That breaks things for the latest MIPS r6 ISA, which encodes theseinstructions differently. Adjust the code so we don't change ISA levelif it's >= 2.Note that this patch doesn't change what happens on an actual MIPS-Iprocessor: either the kernel will emulate these instructionstransparently, or you'll get a SIGILL failure. That tradeoff seemedfine in 2002 when this code was added (cf3cbe6b2), and it's evenmore so today when MIPS-I is basically extinct. But let's add acomment about that.YunQiang Su (with cosmetic adjustments by me). Back-patch to allsupported branches.Discussion:https://postgr.es/m/15844-8f62fe7e163939b3@postgresql.org1 parenta40dca8 commit40dde82
1 file changed
+21
-4
lines changedLines changed: 21 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
598 | 598 |
| |
599 | 599 |
| |
600 | 600 |
| |
601 |
| - | |
602 |
| - | |
603 | 601 |
| |
604 | 602 |
| |
605 | 603 |
| |
606 | 604 |
| |
607 | 605 |
| |
608 | 606 |
| |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
609 | 626 |
| |
610 | 627 |
| |
611 | 628 |
| |
| |||
615 | 632 |
| |
616 | 633 |
| |
617 | 634 |
| |
618 |
| - | |
| 635 | + | |
619 | 636 |
| |
620 | 637 |
| |
621 | 638 |
| |
| |||
637 | 654 |
| |
638 | 655 |
| |
639 | 656 |
| |
640 |
| - | |
| 657 | + | |
641 | 658 |
| |
642 | 659 |
| |
643 | 660 |
| |
|
0 commit comments
Comments
(0)