| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 self=$0 | 2 self=$0 |
| 3 | 3 |
| 4 usage() { | 4 usage() { |
| 5 cat <<EOF >&2 | 5 cat <<EOF >&2 |
| 6 Usage: $self [options] FILE | 6 Usage: $self [options] FILE |
| 7 | 7 |
| 8 Reads the Run Time CPU Detections definitions from FILE and generates a | 8 Reads the Run Time CPU Detections definitions from FILE and generates a |
| 9 C header file on stdout. | 9 C header file on stdout. |
| 10 | 10 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 cat <<EOF | 202 cat <<EOF |
| 203 #ifndef ${include_guard} | 203 #ifndef ${include_guard} |
| 204 #define ${include_guard} | 204 #define ${include_guard} |
| 205 | 205 |
| 206 #ifdef RTCD_C | 206 #ifdef RTCD_C |
| 207 #define RTCD_EXTERN | 207 #define RTCD_EXTERN |
| 208 #else | 208 #else |
| 209 #define RTCD_EXTERN extern | 209 #define RTCD_EXTERN extern |
| 210 #endif | 210 #endif |
| 211 | 211 |
| 212 #ifdef __cplusplus |
| 213 extern "C" { |
| 214 #endif |
| 215 |
| 212 $(process_forward_decls) | 216 $(process_forward_decls) |
| 213 | 217 |
| 214 $(declare_function_pointers c $ALL_ARCHS) | 218 $(declare_function_pointers c $ALL_ARCHS) |
| 215 | 219 |
| 216 void ${symbol:-rtcd}(void); | 220 void ${symbol:-rtcd}(void); |
| 217 EOF | 221 EOF |
| 218 } | 222 } |
| 219 | 223 |
| 220 common_bottom() { | 224 common_bottom() { |
| 221 cat <<EOF | 225 cat <<EOF |
| 226 |
| 227 #ifdef __cplusplus |
| 228 } // extern "C" |
| 229 #endif |
| 230 |
| 222 #endif | 231 #endif |
| 223 EOF | 232 EOF |
| 224 } | 233 } |
| 225 | 234 |
| 226 x86() { | 235 x86() { |
| 227 determine_indirection c $ALL_ARCHS | 236 determine_indirection c $ALL_ARCHS |
| 228 | 237 |
| 229 # Assign the helper variable for each enabled extension | 238 # Assign the helper variable for each enabled extension |
| 230 for opt in $ALL_ARCHS; do | 239 for opt in $ALL_ARCHS; do |
| 231 uc=$(echo $opt | tr '[a-z]' '[A-Z]') | 240 uc=$(echo $opt | tr '[a-z]' '[A-Z]') |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 arm | 363 arm |
| 355 ;; | 364 ;; |
| 356 armv7) | 365 armv7) |
| 357 ALL_ARCHS=$(filter edsp media neon) | 366 ALL_ARCHS=$(filter edsp media neon) |
| 358 arm | 367 arm |
| 359 ;; | 368 ;; |
| 360 *) | 369 *) |
| 361 unoptimized | 370 unoptimized |
| 362 ;; | 371 ;; |
| 363 esac | 372 esac |
| OLD | NEW |