yuyang-ok opened PR #4271 from risc-v
to main
:
I am been trying to add riscv64 backend for cranelift these days.
right now I have pass all run test in filetests.some features not implemented right now.
i128 mul div rem, all simd type and compare overflow.some test need platform support.
like bitrev need qemu-system-riscv64 support bitmanip and zbkb extension (don't know how to enable it.).
yuyang-ok has marked PR #4271 as ready for review.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
Just
has_m
is fine I think.
bjorn3 created PR review comment:
This should also accept
riscv64imac
I think. This is the rustc target for 64bit riscv without theF
,D
,Zicsr
, andZifencei
features.
bjorn3 created PR review comment:
Maybe add presets for riscv64imac and riscv64gc? The x86_64 backend uses code like the following: https://github.com/bytecodealliance/wasmtime/blob/fd3ce1a6cb47b60440d5d35b0670e9139ccd8eb5/cranelift/codegen/meta/src/isa/x86.rs#L185-L189
bjorn3 created PR review comment:
nit:
riscv64gc = []
to keep visual separation.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
This list should also include
has_c
.
bjorn3 created PR review comment:
Can you move this to just below
Self::Arm32Call | Self::Arm64Call => write!(f, "Call")
and keep the newline below that? The newline separates all TLS relocations from the rest. Also please capitalize asRiscvCall
for consistency.
bjorn3 created PR review comment:
There are several unrelated changes across this PR. This is one of them. The change to tests/spec_testsuite is another. Could you please revert them?
bjorn3 created PR review comment:
This will need to be conditional on riscv64 being used.
bjorn3 created PR review comment:
Please use line comments instead of block comments.
// can be load using single imm12.
bjorn3 created PR review comment:
Please use doc comments.
/// An imm20 immediate and a Imm12 immediate can generate what immediate. /// imm20 + imm12
Also I think you should use standalone functions instead of a dummy type.
bjorn3 created PR review comment:
Also I think it should be called
riscv64i
orrv64i
instead. This is the name of the base profile. It should be possible to enable and disable the extensions that form ricv64gc without requiring a completely new backend.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
// calculate by test function riscv64_worst_case_size_instruction_size()
yuyang-ok created PR review comment:
ok.
yuyang-ok submitted PR review.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
cfallin submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
Why name just riscv64 and x64 here? Was this a copy+paste with find+replace on
aarch64
?I think it's probably better to just say "we use the same generic ISA implementation as the other platforms", otherwise we have to update this comment in each platform when we add a new one :-)
cfallin created PR review comment:
Can you say what ELF relocation kind this is equivalent to?
cfallin created PR review comment:
What does this comment mean, "all registers can be alloc"? ("allocated" maybe?) Does this mean all registers are potentially arguments? Please elaborate a bit more...
cfallin created PR review comment:
I'm not sure I understand this comment. Also, please don't have commented-out code.
cfallin created PR review comment:
Please don't use C-style block comments.
cfallin created PR review comment:
this allocates a new
Vec
every time it's called; we don't need to do that, since there are only two possible vecs, one forArgs
and one forRets
. We should probably have a static array instead (let x_registers = &[...]
).
cfallin created PR review comment:
Please:
- Don't use C-style block comments (
/* ... */
);Fix the grammar here:
- "when run out register , " --> "When we run out of registers, "
- "we should use stack space for parameter" --> "We allocate remaining parameters on the stack."
- "we should deal with paramter backwards" --> spelling ("parameter"), also what does this mean?
basically, I'm not sure I understand what this comment means, please clarify...
cfallin created PR review comment:
Empty three-line block comment?
cfallin created PR review comment:
- Spaces between
//
start of comment and comment text- move out of doc-comment position and into function body
- align the
;;
assembly comments- s/sapce/space/, again (please spell-check comments in general or at least grep for this common typo!)
cfallin created PR review comment:
- This code fragment comment should go inside the function, not in doc-comment position
- The instruction
add sp, sp-8
doesn't make sense to me; is this really how RISC-V writes it? Should it beadd sp, sp, -8
?- s/sapce/space/
cfallin created PR review comment:
This will need to be filled in.
cfallin created PR review comment:
Why was the unstable-sort commented out and replaced with
sort
here?
- No commented-out code in comments, as mentioned multiple times above (please make a pass over the whole PR for this!)
- If there was an issue with the original code, we should deal with it properly
cfallin created PR review comment:
s/Store/store/ (no need to capitalize)
cfallin created PR review comment:
fix grammar in comment?
"Returns whether a register must be saved by the callee" or something like that...
cfallin created PR review comment:
s/sources/source/
cfallin created PR review comment:
Please replace this whole body of commented-out code with an implementation.
Re: temp register, is there an assembler temp or linker temp you can use? How would a call normally be codegen'd?
cfallin created PR review comment:
s/An/A/
cfallin created PR review comment:
What does this comment mean?
cfallin created PR review comment:
s/base on/based on/
cfallin created PR review comment:
Space between
;;
and comment.
cfallin created PR review comment:
s/base on/based on/
cfallin created PR review comment:
CsrOp
, notCsrOP
, is generally the capitalization pattern we use for types here (Op
is short forOperator
which is one word, not an acronym).Please use Lisp-style s-expr formatting:
- Space between
CsrOp
and the(enum ...)
- sub-forms
(Csrrw)
,(Csrrs)
, ... indented under the(enum ...)
- all closing parens on one line
cfallin created PR review comment:
formatting -- extra space
cfallin created PR review comment:
Here and throughout all the ISLE files, please mind the extra blank lines: just one blank line between grouped definitions is enough.
cfallin created PR review comment:
same formatting issue here as above
cfallin created PR review comment:
what does this comment mean?
cfallin created PR review comment:
paren on closing line should be at end of last form:
... rs2))
cfallin created PR review comment:
- s/for emit/for emitting/
- s/Interger/Integer/
(and likewise below)
cfallin created PR review comment:
FRM
is too short; could we sayFpRoundMode
or similar? (And likewise forget_default_frm
)
cfallin created PR review comment:
- Capitalize beginning of sentences: "Some ..."
- s/instruction/instructions/
- s/paramter/parameter/
cfallin created PR review comment:
formatting -- spaces around outside of parens. The standard way of writing this would be:
(decl alu_add (Reg Reg) Reg)
cfallin created PR review comment:
Spaces around outside of parens
cfallin created PR review comment:
s/get negative/getting the negative/ (or just "negating")
cfallin created PR review comment:
Indeed, this definitely shouldn't be in the backend-specific definitions. Also, isn't this already what
def_inst
does?
cfallin created PR review comment:
These sorts of converters should be in the general prelude, not in the RISC-V-specific one.
Also, implicit conversions between integer types are very dangerous, IMHO; I'd rather we be explicit about those conversions (as we are in Rust, with
u32::try_from(x).unwrap()
and such) to avoid accidental truncations or wraparounds or incorrect extensions...
cfallin created PR review comment:
- s/for narrow down/for narrowing down/
- s/it's/its/
cfallin created PR review comment:
empty comment?
cfallin created PR review comment:
opening paren should not be on a separate line (!) from its term:
(alu_rr_imm12 ...)
please!
cfallin created PR review comment:
This and the above can probably be replaced with lookup tables; otherwise the whole loop needs to be unrolled and optimized to produce code that is reasonable.
cfallin created PR review comment:
This whole module will need to be filled in, and not be commented-out code.
cfallin created PR review comment:
This test harness is actually pretty nice! However I think that we can't require a RISC-V toolchain to be installed in order to assemble the instructions. At best we could have an option to verify handwritten machine-code strings against instructions, if a certain Cargo feature is enabled. But the default tests should run without calling out to any other program like gcc.
cfallin created PR review comment:
Temporary code that should be removed.
cfallin created PR review comment:
I don't think we really need to replicate the pattern from x64 where each individual register has its own function;
areg(0)
,areg(1)
, is cleaner IMHO.
cfallin created PR review comment:
Also: if there is a standard document describing the calling convention for riscv64 (is it also called something like "SystemV" there?) could we link it here?
cfallin created PR review comment:
Is the commonly-accepted name as given for "platform" arguments just
riscv64
? Should the variants (G
,C,
IMAC`, others) be ISA flags instead?Surveying e.g. Linux distros, I see that Fedora and Debian call the ISA
riscv64
; Rust usesriscv64gc
in triples butriscv64
in a module name in the stdlib. In this PR the backend is in ariscv64
directory.I'm fine either way I just want to make sure we give it a few seconds of thought :-)
cfallin created PR review comment:
+1 to
has_m
. Also, the descriptive text should actually say what the extension is, not just "extension M" -- that I could gather from the option name itself.
cfallin created PR review comment:
This should be implemented without dynamically allocating memory and building a
Vec
. Can you return a static&[Writable<Reg>]
?
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
not very clear, I found it in riscv-abi.pdf
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
means potentially arguments.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
ok,I will try.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
look fine, I think this is better to read.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
ok.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
ok.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
yes I Copy it , I did not know where this information used.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
ok I have already remove it.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
look I cannot because of
error[E0015]: cannot call non-const fn inst::regs::x_reg
in constants
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
@cfallin some code are copied from aarch64. :)
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
@cfallin I aslo a little confused with platform name, riscv64gc is just my local test qemu system name.
yuyang-ok updated PR #4271 from risc-v
to main
.
a1phyr submitted PR review.
a1phyr created PR review comment:
I think that
x_reg
could be made a const-fn, every function it calls is const or could be made const.
afonso360 submitted PR review.
afonso360 created PR review comment:
Clang/LLVM have
riscv64
but parse flags from the-march
argument using the standard algorithm.
clang --target=riscv64-unknown-elf -march=rv64gcv
The above would translate to something like:
has_i has_m has_a has_f has_d has_zicsr has_zifencei has_c has_v
The RISCV Spec specifies how these flags should be parsed in Chapter 27 of the spec (page 149).
--
Having to specify all the flags individually might be tedious, but having
gc
enabled by default and enabling or disabling others usinghas_x
I think might be a good compromise.Or we could implement the parsing algorithm and require specifying some variation of
rv64xxx
along with the target.
afonso360 edited PR review comment.
afonso360 edited PR review comment.
afonso360 edited PR review comment.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
bjorn3 created PR review comment:
Stack probing is a method to catch stack overflows and ensure the program aborts and not for example overwrites the heap. This is done by adding a guard page at the end of the stack for which all accesses cause a SIGSEGV. If stack frames are smaller than a page, nothing else needs to be done. If the stack frame is larger, a stack probe function is called which reads a single byte from every page in the stack frame to ensure that a stack overflow hits the guard page.
bjorn3 submitted PR review.
yuyang-ok created PR review comment:
ok,thanks.
yuyang-ok submitted PR review.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
@a1phyr yes
![image](https://user-images.githubusercontent.com/96557710/179336523-3828ac41-1191-46b9-8ced-1af47c69fe2a.png)
but some function is not a const.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok created PR review comment:
I have already remove the function "param_or_rets_xregs".
yuyang-ok submitted PR review.
yuyang-ok edited PR #4271 from risc-v
to main
:
I am been trying to add riscv64 backend for cranelift these days.
right now I have pass all run test in filetests.some features not implemented right now.
i128 mul div rem, all simd type and compare overflow.some test need platform support.
like bitrev need qemu-riscv64 support bitmanip and zbkb extension (don't know how to enable it.).
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
@bjorn3 I think I learnd this concept from an operating system course.
yuyang-ok deleted PR review comment.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok has marked PR #4271 as ready for review.
yuyang-ok requested cfallin for a review on PR #4271.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok created PR review comment:
I have change the name to riscv64.
yuyang-ok submitted PR review.
yuyang-ok deleted PR review comment.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
Can you say what ELF relocation kind this is equivalent to?
@cfallin I not quit understand the question.
I found this at riscv-abi.pdf .
![image](https://user-images.githubusercontent.com/96557710/183373482-e3cdf60e-1ff4-4fc8-b51d-93b151f9bbc3.png)
[riscv-abi.pdf](https://github.com/bytecodealliance/wasmtime/files/9280125/riscv-abi.pdf)
yuyang-ok created PR review comment:
Ok , thanks , I thinks I have remove all C-style block comments.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
I have remove this comment.
yuyang-ok submitted PR review.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
sorry about the typo.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
removed. :-)
yuyang-ok created PR review comment:
what should be the call convention for gen_probestack , I only found one call convention for risc-v on internet.
yuyang-ok submitted PR review.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
removed the comment. the code is copied from aarch64.
yuyang-ok created PR review comment:
const fn should be ok??
yuyang-ok submitted PR review.
yuyang-ok deleted PR review comment.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
ok. solved.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
I want to remain this way.Is that ok?
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
pub fn builder_with_options(infer_native_flags: bool) -> Result<isa::Builder, &'static str> {
I remove the infer_native_flags functionality for risc-v64 , I tried some time , but still compile not ok for stable tool chain.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
afonso360 submitted PR review.
afonso360 created PR review comment:
Usually SIMD types are in separate test files. Can you move the
i8x16
test into a separatesimd-popcnt.clif
file and enable the scalar tests here?
afonso360 submitted PR review.
afonso360 created PR review comment:
Is this file deleted by accident?
afonso360 submitted PR review.
afonso360 created PR review comment:
It looks like we have lowerings for
cls
. Are these tests disabled for any particular reason?
afonso360 created PR review comment:
I think this might be an old comment, we now not only skip based on arch but check the native ISA flags to see if the host can run the particular test.
afonso360 submitted PR review.
afonso360 edited PR review comment.
afonso360 edited PR review comment.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
Yes,I can. But I have not edit this file before.
yuyang-ok created PR review comment:
yes , I think so . I have recovered it.
yuyang-ok submitted PR review.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
Yes, But My local qemu-riscv64 emulator doesn't implement it, I can't test it. right now I have two implemetion,
One rely onB
extension , One don't.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
ok,I have merged the newest code.
afonso360 submitted PR review.
afonso360 created PR review comment:
I think we don't need to duplicate all this code, we can probably do something along the lines of:
match (host_arch, requested_arch) { (host, requested) if host == requested => {}, (Architecture::Riscv64(_), Architecture::Riscv64(_)) => {}, _ => println!("skipped: ... etc""), }
afonso360 submitted PR review.
afonso360 created PR review comment:
Note, these are not duplicates of the ones below!
These targets, run this test file without the
avoid_div_traps
flag, and the ones below run the test file with theavoid_div_traps
flag. Although we should probably clarify that in a comment
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok created PR review comment:
ok , thanks.
yuyang-ok submitted PR review.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
cfallin updated PR #4271 from risc-v
to main
.
cfallin updated PR #4271 from risc-v
to main
.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
ok, why I didn't see any test want to div by zero?
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
what will cranelift expect to produce if
100/0
??
cfallin submitted PR review.
cfallin created PR review comment:
@yuyang-ok we get divide-by-zero coverage via the Wasm tests run by Wasmtime.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
@cfallin yes,But I think wasmtime test will all want to cause trap.
I see test inurem.clif
set this flag.
function %urem_i64(i64, i64) -> i64 {
block0(v0: i64,v1: i64):
v2 = urem v0, v1
return v2
}
; run: %urem_i64(0, 1) == 0
; run: %urem_i64(2, 2) == 0
; run: %urem_i64(1, -1) == 1
; run: %urem_i64(3, 2) == 1
; run: %urem_i64(19, 7) == 5
; run: %urem_i64(3, -2) == 3
; run: %urem_i64(-19, 7) == 4
; run: %urem_i64(-57, -5) == -57
; run: %urem_i64(0, 104857600000) == 0
; run: %urem_i64(104857600000, 511) == 398
; run: %urem_i64(0xC0FFEEEE_DECAFFFF, 8) == 7
; run: %urem_i64(0xC0FFEEEE_DECAFFFF, -8) == 0xC0FFEEEE_DECAFFFF
; run: %urem_i64(0x80000000_00000000, -2) == 0x80000000_00000000
I didn't see you want to divide by zero.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
afonso360 submitted PR review.
afonso360 submitted PR review.
afonso360 created PR review comment:
It looks like this was accidentally included. I had to use this in my branch to test CI, but its probably something we don't want to include for everyone.
afonso360 created PR review comment:
Yeah, We can't test traps via filetests yet! But it was something that was brought up recently in https://github.com/bytecodealliance/wasmtime/issues/4781.
Adding div by zero tests would be nice, but if we can't catch the traps properly we can't include it in the test suite (since it makes it crash)
afonso360 created PR review comment:
These 3 lines test
urem
's without theavoid_div_traps
enabled and are not duplicates, although that is perhaps not very clear.
afonso360 deleted PR review comment.
afonso360 submitted PR review.
afonso360 created PR review comment:
Yeah, We can't test traps via filetests yet! But it was something that was brought up recently in #4781.
Adding div by zero tests would be nice, but if we can't catch the traps properly, we can't include it in the test suite (since it makes it crash).
afonso360 edited PR review comment.
afonso360 edited PR review comment.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
look like we can test divide by zero in
urem.clif
because we canavoid_div_traps
, but I didn't know whick value should produce.
yuyang-ok edited PR review comment.
yuyang-ok created PR review comment:
ok, I will recover it
yuyang-ok submitted PR review.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
I didn't know why these 3 line show deleted.
![image](https://user-images.githubusercontent.com/96557710/191631869-f42b56ea-5baa-4265-b20d-f25a294424a0.png)
bjorn3 submitted PR review.
bjorn3 created PR review comment:
There were additional
target
lines above the; Test these inputs without div traps, ...
line that have been removed in this PR. Could you please add them back.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok created PR review comment:
@bjorn3 sorry I didn't notice.
yuyang-ok submitted PR review.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
yuyang-ok updated PR #4271 from risc-v
to main
.
afonso360 submitted PR review.
afonso360 created PR review comment:
Are we using this feature flag anywhere? I can't see it.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
this is used.
![image](https://user-images.githubusercontent.com/96557710/192257511-76defd6e-5c74-4e38-b62b-af9b3e7141ec.png)
afonso360 created PR review comment:
That one seems to be the one on the
cranelift-codegen
crate, instead of thecranelift-native
. For example we don't have thex86
,arm64
ors390x
features in this crate.
afonso360 submitted PR review.
afonso360 edited PR review comment.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
@afonso360 sorry, I forget to remove it.
yuyang-ok created PR review comment:
deleted now.
yuyang-ok submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
Why do we ignore the argument to the
Riscv64
enum arm here? If we really need to special-case RISC-V in the toplevel test runner, can we factor the logic out somewhere else (to a "compatible RISC-V variant" helper function or something like that)?
cfallin submitted PR review.
yuyang-ok submitted PR review.
yuyang-ok created PR review comment:
the current implementation is a little sloppy.
fn is_riscv64_compatible(
req: target_lexicon::Riscv64Architecture,
+) -> bool {
match host {
}
+}
+
/// Checks if the host's ISA is compatible with the one requested by the test.
fn is_isa_compatible(
file_path: &str,
@@ -61,7 +85,8 @@ fn is_isa_compatible(
match (host_arch, requested_arch) {
(host, requested) if host == requested => {}
(Architecture::Riscv64(_), Architecture::Riscv64(_)) => {}
yuyang-ok updated PR #4271 from risc-v
to main
.
cfallin submitted PR review.
cfallin merged PR #4271.
Last updated: Dec 23 2024 at 13:07 UTC