@@ -82,12 +82,9 @@ extern "C" {
8282#[ allow( unused_imports) ]
8383use kernel:: { csr_op, csr_ptr, is_cheri, ldptr, ldx, ptrreg, stptr, stx} ;
8484
85- #[ cfg( any(
86- doc,
87- all(
88- any( target_arch = "riscv32" , target_arch = "riscv64" ) ,
89- target_os = "none"
90- )
85+ #[ cfg( all(
86+ any( target_arch = "riscv32" , target_arch = "riscv64" ) ,
87+ target_os = "none"
9188) ) ]
9289core:: arch:: global_asm!( crate :: easm!( "
9390 .section .riscv.start, \" ax\"
@@ -298,12 +295,9 @@ extern "C" {
298295 pub fn _start_trap ( ) ;
299296}
300297
301- #[ cfg( any(
302- doc,
303- all(
304- any( target_arch = "riscv32" , target_arch = "riscv64" ) ,
305- target_os = "none"
306- )
298+ #[ cfg( all(
299+ any( target_arch = "riscv32" , target_arch = "riscv64" ) ,
300+ target_os = "none"
307301) ) ]
308302core:: arch:: global_asm!( crate :: easm!(
309303 "
@@ -416,12 +410,9 @@ core::arch::global_asm!(crate::easm!(
416410/// https://elixir.bootlin.com/linux/v5.12.10/source/arch/riscv/include/asm/jump_label.h#L21
417411/// as suggested by the RISC-V developers:
418412/// https://groups.google.com/a/groups.riscv.org/g/isa-dev/c/XKkYacERM04/m/CdpOcqtRAgAJ
419- #[ cfg( any(
420- doc,
421- all(
422- any( target_arch = "riscv32" , target_arch = "riscv64" ) ,
423- target_os = "none"
424- )
413+ #[ cfg( all(
414+ any( target_arch = "riscv32" , target_arch = "riscv64" ) ,
415+ target_os = "none"
425416) ) ]
426417pub unsafe fn semihost_command ( command : usize , arg0 : usize , arg1 : usize ) -> usize {
427418 use core:: arch:: asm;
@@ -445,7 +436,7 @@ pub unsafe fn semihost_command(command: usize, arg0: usize, arg1: usize) -> usiz
445436}
446437
447438// Mock implementation for tests on Travis-CI.
448- #[ cfg( not( any ( target_os = "none" ) ) ) ]
439+ #[ cfg( not( target_os = "none" ) ) ]
449440pub unsafe fn semihost_command ( _command : usize , _arg0 : usize , _arg1 : usize ) -> usize {
450441 unimplemented ! ( )
451442}
0 commit comments