File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
crates/stdarch-gen-loongarch/src Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,28 @@ jobs:
255
255
env :
256
256
TARGET : ${{ matrix.target.tuple }}
257
257
258
+ # Check that the generated files agree with the checked-in versions.
259
+ check-stdarch-gen :
260
+ needs : [style]
261
+ name : Check stdarch-gen-{arm, loongarch} output
262
+ runs-on : ubuntu-latest
263
+ steps :
264
+ - uses : actions/checkout@v4
265
+ - name : Install Rust
266
+ run : rustup update nightly && rustup default nightly && rustup component add rustfmt
267
+ - name : Check arm spec
268
+ run : |
269
+ cargo run --bin=stdarch-gen-arm --release -- crates/stdarch-gen-arm/spec
270
+ git diff --exit-code
271
+ - name : Check lsx.spec
272
+ run : |
273
+ cargo run --bin=stdarch-gen-loongarch --release -- crates/stdarch-gen-loongarch/lsx.spec
274
+ git diff --exit-code
275
+ - name : Check lasx.spec
276
+ run : |
277
+ cargo run --bin=stdarch-gen-loongarch --release -- crates/stdarch-gen-loongarch/lasx.spec
278
+ git diff --exit-code
279
+
258
280
build-std-detect :
259
281
needs : [style]
260
282
name : Build std_detect
@@ -271,6 +293,7 @@ jobs:
271
293
- verify
272
294
- test
273
295
- build-std-detect
296
+ - check-stdarch-gen
274
297
runs-on : ubuntu-latest
275
298
# We need to ensure this job does *not* get skipped if its dependencies fail,
276
299
# because a skipped job is considered a success by GitHub. So we have to
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ fn gen_bind_body(
280
280
let fn_output = if out_t. to_lowercase ( ) == "void" {
281
281
String :: new ( )
282
282
} else {
283
- format ! ( "-> {}" , type_to_rst( out_t, is_store) )
283
+ format ! ( " -> {}" , type_to_rst( out_t, is_store) )
284
284
} ;
285
285
let fn_inputs = match para_num {
286
286
1 => format ! ( "(a: {})" , type_to_rst( in_t[ 0 ] , is_store) ) ,
@@ -304,7 +304,7 @@ fn gen_bind_body(
304
304
) ,
305
305
_ => panic ! ( "unsupported parameter number" ) ,
306
306
} ;
307
- format ! ( "fn __{current_name}{fn_inputs} {fn_output};" )
307
+ format ! ( "fn __{current_name}{fn_inputs}{fn_output};" )
308
308
} ;
309
309
let function = format ! (
310
310
r#" #[link_name = "llvm.loongarch.{}"]
You can’t perform that action at this time.
0 commit comments