int main(int argc, char *argv[]) { unsigned long long now; unsigned long long latency; FunctionalUnitManager fum("fu.txt"); fum.dumpFunctionalUnits(); // let's turn off the adder now = 100; #define ISSUE(mask, time) { fum.processAtIssue(mask, time); cout<<"ISSUE @ "<<time<<" Total Power: "<<fum.getTotalPower(time)<<endl; fum.dumpStats(time);} #define COMMIT(mask, time) { fum.processAtCommit(mask, time); cout<<"COMMIT @ "<<time<<" Total Power: "<<fum.getTotalPower(time)<<endl; fum.dumpStats(time);} ISSUE(OFF, 100); ISSUE(ADD, 110); COMMIT(OFF, 130); ISSUE(ADD , 200); return 0; }
main() { for (j = 0; j < 2; j++) { i = foo() + (j ? j + fee() + fie() : k) + fum(); printf("%d ", i); } printf("\n"); }
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-require-ifunc "" } */ int fum (); // Extra declaration that is merged with the second one. int fum () __attribute__ ((target("default"))); int fum () __attribute__((target( "mmx"))); int fum () __attribute__((target( "popcnt"))); int fum () __attribute__((target( "sse"))); int fum () __attribute__((target( "sse2"))); int fum () __attribute__((target( "sse3"))); int fum () __attribute__((target( "ssse3"))); int fum () __attribute__((target( "sse4.1"))); int fum () __attribute__((target( "sse4.2"))); int fum () __attribute__((target( "avx"))); int fum () __attribute__((target( "avx2"))); int fum () __attribute__((target("arch=core2"))); int fum () __attribute__((target("arch=corei7"))); int fum () __attribute__((target("arch=atom"))); int (*p)() = &fum; int j = fum();