Skip to content

Commit bde7153

Browse files
authored
Merge branch 'release/21.x' into fhossein/seto_setuo
2 parents a31b13e + 18593ab commit bde7153

File tree

9 files changed

+51
-175
lines changed

9 files changed

+51
-175
lines changed

.github/workflows/release-asset-audit.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def _get_uploaders(release_version):
5454
"tru",
5555
"tstellar",
5656
"github-actions[bot]",
57+
"c-rhodes",
58+
"dyung",
5759
]
5860
)
5961

.github/workflows/release-binaries-save-stage/action.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/release-binaries-setup-stage/action.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/release-binaries.yml

Lines changed: 21 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -194,40 +194,30 @@ jobs:
194194
runs-on: ${{ needs.prepare.outputs.build-runs-on }}
195195
steps:
196196

197-
- name: Checkout Actions
198-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
199-
with:
200-
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
201-
sparse-checkout: |
202-
.github/workflows/
203-
sparse-checkout-cone-mode: false
204-
# Check out outside of working directory so the source checkout doesn't
205-
# remove it.
206-
path: workflows
207-
208-
# actions/checkout does not support paths outside of the GITHUB_WORKSPACE.
209-
# Also, anything that we put inside of GITHUB_WORKSPACE will be overwritten
210-
# by future actions/checkout steps. Therefore, in order to checkout the
211-
# latest actions from main, we need to first checkout out the actions inside of
212-
# GITHUB_WORKSPACE (see previous step), then use actions/checkout to checkout
213-
# the code being built and the move the actions from main back into GITHUB_WORKSPACE,
214-
# becasue the uses on composite actions only reads workflows from inside GITHUB_WORKSPACE.
215-
- shell: bash
216-
run: mv workflows ../workflows-main
217-
218197
- name: Checkout LLVM
219198
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
220199
with:
221200
ref: ${{ needs.prepare.outputs.ref }}
222201

223-
- name: Copy main workflows
224-
shell: bash
225-
run: |
226-
mv ../workflows-main .
202+
- name: Install Ninja
203+
uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main
204+
205+
- name: Setup Windows
206+
if: startsWith(runner.os, 'Windows')
207+
uses: llvm/actions/setup-windows@main
208+
with:
209+
arch: amd64
227210

228-
- name: Setup Stage
211+
- name: Set Build Prefix
229212
id: setup-stage
230-
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
213+
shell: bash
214+
run: |
215+
build_prefix=`pwd`
216+
if [ "${{ runner.os }}" = "Linux" ]; then
217+
sudo chown $USER:$USER /mnt/
218+
build_prefix=/mnt/
219+
fi
220+
echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT
231221
232222
- name: Configure
233223
id: build
@@ -258,17 +248,11 @@ jobs:
258248
path: |
259249
${{ needs.prepare.outputs.release-binary-filename }}
260250
261-
# Clean up some build files to reduce size of artifact.
262-
- name: Clean Up Build Directory
263-
shell: bash
251+
- name: Run Tests
252+
# These almost always fail so don't let them fail the build and prevent the uploads.
253+
continue-on-error: true
264254
run: |
265-
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname ${{ needs.prepare.outputs.release-binary-filename }} -delete
266-
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname _CPack_Packages -prune -exec rm -r {} +
267-
268-
- name: Save Stage
269-
uses: ./workflows-main/.github/workflows/release-binaries-save-stage
270-
with:
271-
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
255+
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all
272256
273257
upload-release-binaries:
274258
name: "Upload Release Binaries"
@@ -327,31 +311,3 @@ jobs:
327311
--release ${{ needs.prepare.outputs.release-version }} \
328312
upload \
329313
--files ${{ needs.prepare.outputs.release-binary-filename }}*
330-
331-
test-release:
332-
name: "Test Release"
333-
needs:
334-
- prepare
335-
- build-release-package
336-
if: >-
337-
github.repository_owner == 'llvm'
338-
runs-on: ${{ needs.prepare.outputs.test-runs-on }}
339-
steps:
340-
- name: Checkout Actions
341-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
342-
with:
343-
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
344-
sparse-checkout: |
345-
.github/workflows/
346-
sparse-checkout-cone-mode: false
347-
path: workflows
348-
- name: Setup Stage
349-
id: setup-stage
350-
uses: ./workflows/.github/workflows/release-binaries-setup-stage
351-
with:
352-
previous-artifact: build-release-package
353-
354-
- name: Run Tests
355-
shell: bash
356-
run: |
357-
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all

libunwind/src/UnwindRegistersRestore.S

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,9 +1044,10 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind18Registers_mips_o326jumptoEv)
10441044
lw $27, (4 * 27)($4)
10451045
lw $28, (4 * 28)($4)
10461046
lw $29, (4 * 29)($4)
1047-
lw $30, (4 * 30)($4)
10481047
// load new pc into ra
10491048
lw $31, (4 * 32)($4)
1049+
// MIPS 1 has load delay slot. Ensure lw $31 and jr are separated by an instruction.
1050+
lw $30, (4 * 30)($4)
10501051
// jump to ra, load a0 in the delay slot
10511052
jr $31
10521053
lw $4, (4 * 4)($4)
@@ -1082,11 +1083,13 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind21Registers_mips_newabi6jumptoEv)
10821083
ld $2, (8 * 2)($4)
10831084
ld $3, (8 * 3)($4)
10841085
// skip a0 for now
1085-
.irp i,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30
1086+
.irp i,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29
10861087
ld $\i, (8 * \i)($4)
10871088
.endr
10881089
// load new pc into ra
10891090
ld $31, (8 * 32)($4)
1091+
// MIPS 1 has load delay slot. Ensure lw $31 and jr are separated by an instruction.
1092+
ld $30, (8 * 30)($4)
10901093
// jump to ra, load a0 in the delay slot
10911094
jr $31
10921095
ld $4, (8 * 4)($4)

lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ void ProcessWindows::OnExitProcess(uint32_t exit_code) {
666666
target->ModulesDidUnload(unloaded_modules, true);
667667
}
668668

669-
SetProcessExitStatus(GetID(), true, 0, exit_code);
669+
SetExitStatus(exit_code, /*exit_string=*/"");
670670
SetPrivateState(eStateExited);
671671

672672
ProcessDebugger::OnExitProcess(exit_code);

llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3676,7 +3676,7 @@ bool MipsAsmParser::expandBranchImm(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
36763676
Out, STI))
36773677
return true;
36783678

3679-
if (IsLikely) {
3679+
if (IsLikely && MemOffsetOp.isExpr()) {
36803680
TOut.emitRRX(OpCode, DstRegOp.getReg(), ATReg,
36813681
MCOperand::createExpr(MemOffsetOp.getExpr()), IDLoc, STI);
36823682
TOut.emitRRI(Mips::SLL, Mips::ZERO, Mips::ZERO, 0, IDLoc, STI);

llvm/lib/Target/Mips/MipsInstrInfo.td

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,16 @@ def calltarget : Operand<iPTR> {
858858

859859
def imm64: Operand<i64>;
860860

861+
def ConstantImmAsmOperandClass : AsmOperandClass {
862+
let Name = "ConstantImm";
863+
let PredicateMethod = "isConstantImm";
864+
let RenderMethod = "addImmOperands";
865+
}
866+
867+
def ConstantImm64: Operand<i64> {
868+
let ParserMatchClass = ConstantImmAsmOperandClass;
869+
}
870+
861871
def simm19_lsl2 : Operand<i32> {
862872
let EncoderMethod = "getSimm19Lsl2Encoding";
863873
let DecoderMethod = "DecodeSimm19Lsl2";
@@ -2950,10 +2960,10 @@ def : MipsInstAlias<"nor\t$rs, $imm", (NORImm GPR32Opnd:$rs, GPR32Opnd:$rs,
29502960

29512961
let hasDelaySlot = 1, isCTI = 1 in {
29522962
def BneImm : MipsAsmPseudoInst<(outs GPR32Opnd:$rt),
2953-
(ins imm64:$imm64, brtarget:$offset),
2963+
(ins ConstantImm64:$imm64, brtarget:$offset),
29542964
"bne\t$rt, $imm64, $offset">;
29552965
def BeqImm : MipsAsmPseudoInst<(outs GPR32Opnd:$rt),
2956-
(ins imm64:$imm64, brtarget:$offset),
2966+
(ins ConstantImm64:$imm64, brtarget:$offset),
29572967
"beq\t$rt, $imm64, $offset">;
29582968

29592969
class CondBranchPseudo<string instr_asm> :
@@ -2981,7 +2991,7 @@ def BGTUL: CondBranchPseudo<"bgtul">, ISA_MIPS2_NOT_32R6_64R6;
29812991

29822992
let isCTI = 1 in
29832993
class CondBranchImmPseudo<string instr_asm> :
2984-
MipsAsmPseudoInst<(outs), (ins GPR32Opnd:$rs, imm64:$imm, brtarget:$offset),
2994+
MipsAsmPseudoInst<(outs), (ins GPR32Opnd:$rs, ConstantImm64:$imm, brtarget:$offset),
29852995
!strconcat(instr_asm, "\t$rs, $imm, $offset")>;
29862996

29872997
def BEQLImmMacro : CondBranchImmPseudo<"beql">, ISA_MIPS2_NOT_32R6_64R6;

llvm/test/MC/Mips/branch-pseudos-bad.s

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# RUN: not llvm-mc %s -triple=mips -mcpu=mips32 2>&1 | FileCheck %s
22

3+
# CHECK: error: invalid operand for instruction
4+
beql $t0, ($t0), 1
5+
# CHECK: error: invalid operand for instruction
6+
bne $t0, ($t0), 1
7+
# CHECK: error: invalid operand for instruction
8+
beq $t0, ($t0), 1
9+
10+
311
# Check for errors when using conditional branch pseudos after .set noat.
412
.set noat
513
local_label:

0 commit comments

Comments
 (0)