- Timestamp:
- Aug 14, 2016, 7:25:00 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 797347f
- Parents:
- 1d4580a
- Location:
- src/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/.expect/64/gccExtensions.txt
r1d4580a r777bfcf 5 5 extern void exit(int __status); 6 6 extern int printf(const char *__restrict __format, ...); 7 extern int __x__i_1; 7 8 int main(int __argc__i_1, const char **__argv__PPCc_1){ 8 9 asm ( "nop" : : : ); 9 10 asm ( "nop" : : : ); 10 11 asm ( "nop" : : : ); 12 static int __y__i_2; 13 int __src__i_2; 14 int __dst__i_2; 15 asm volatile ( "mov %1, %0\n\tadd $1, %0" : : : ); 16 asm volatile ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ) : : ); 17 asm volatile ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ) : "r" ( __src__i_2 ) : ); 18 asm ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ), "=r" ( __src__i_2 ) : [ __src__i_2 ] "r" ( __dst__i_2 ) : "r0" ); 11 19 double _Complex __c1__Xd_2; 12 20 double _Complex __c2__Xd_2; -
src/tests/gccExtensions.c
r1d4580a r777bfcf 1 // 2 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo 3 // 4 // The contents of this file are covered under the licence agreement in the 5 // file "LICENCE" distributed with Cforall. 6 // 7 // gccExtensions.c -- 8 // 9 // Author : Peter A. Buhr 10 // Created On : Sun Aug 14 17:28:17 2016 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Aug 14 17:36:28 2016 13 // Update Count : 3 14 // 15 16 extern int x asm( "xx" ); 17 1 18 int main(int argc, char const *argv[]) { 2 19 asm( "nop" ); … … 4 21 __asm__( "nop" ); 5 22 23 static int y asm( "yy" ); 24 // static * int z asm( "zz" ); // CFA declaration 25 26 int src; 27 int dst; 28 29 asm volatile ( "mov %1, %0\n\t" 30 "add $1, %0" : : : ); 31 32 asm volatile ( "mov %1, %0\n\t" 33 "add $1, %0" 34 : "=" "r" (dst)); 35 36 asm volatile ( "mov %1, %0\n\t" 37 "add $1, %0" 38 : "=r" (dst) 39 : "r" (src)); 40 41 asm ( "mov %1, %0\n\t" 42 "add $1, %0" 43 : "=r" (dst), "=r" (src) 44 : [src] "r" (dst) 45 : "r0"); 46 #if 0 47 L1: L2: 48 asm goto ( "frob %%r5, %1; jc %l[L1]; mov (%2), %%r5" 49 : /* No outputs. */ 50 : "r"(src), "r"(&dst) 51 : "r5", "memory" 52 : L1, L2 ); 53 #endif 6 54 __complex__ c1; 7 55 _Complex c2; … … 57 105 return 0; 58 106 } 107 108 // Local Variables: // 109 // tab-width: 4 // 110 // compile-command: "cfa gccExtensions.c" // 111 // End: //
Note: See TracChangeset
for help on using the changeset viewer.