mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			570 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			570 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ add-core-stubs
 | |
| //@ compile-flags: --target csky-unknown-linux-gnuabiv2
 | |
| //@ needs-llvm-components: csky
 | |
| 
 | |
| #![crate_type = "rlib"]
 | |
| #![feature(no_core, asm_experimental_arch)]
 | |
| #![no_core]
 | |
| 
 | |
| extern crate minicore;
 | |
| use minicore::*;
 | |
| 
 | |
| // CHECK-LABEL: @flags_clobber
 | |
| // CHECK: call void asm sideeffect "", "~{psr}"()
 | |
| #[no_mangle]
 | |
| pub unsafe fn flags_clobber() {
 | |
|     asm!("", options(nostack, nomem));
 | |
| }
 | |
| 
 | |
| // CHECK-LABEL: @no_clobber
 | |
| // CHECK: call void asm sideeffect "", ""()
 | |
| #[no_mangle]
 | |
| pub unsafe fn no_clobber() {
 | |
|     asm!("", options(nostack, nomem, preserves_flags));
 | |
| }
 | 
