Changeset 866cad3


Ignore:
Timestamp:
Jul 24, 2021, 4:29:47 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
70df5f3, 98233b3
Parents:
a5a6a1a8
Message:

Changed how the cross exception benchmarks prevent optimization. Hopefully this will work on more platforms.

Location:
doc/theses/andrew_beach_MMath/code
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/code/cross-catch.cfa

    ra5a6a1a8 r866cad3  
    1111int main(int argc, char * argv[]) {
    1212        unsigned int times = 1;
    13         bool should_throw = false;
     13        volatile bool should_throw = false;
    1414        if (1 < argc) {
    1515                times = strtol(argv[1], 0p, 10);
     
    1919        for (unsigned int count = 0 ; count < times ; ++count) {
    2020                try {
    21                         asm volatile ("# try block" : "=rm" (should_throw));
     21                        asm volatile ("# try block");
    2222                        if (should_throw) {
    2323                                throw (not_raised_exception){&not_vt};
  • doc/theses/andrew_beach_MMath/code/cross-catch.cpp

    ra5a6a1a8 r866cad3  
    1111int main(int argc, char * argv[]) {
    1212        unsigned int times = 1;
    13         bool should_throw = false;
     13        volatile bool should_throw = false;
    1414        if (1 < argc) {
    1515                times = strtol(argv[1], nullptr, 10);
     
    1919        for (unsigned int count = 0 ; count < times ; ++count) {
    2020                try {
    21                         asm volatile ("# try block" : "=rm" (should_throw));
     21                        asm volatile ("# try block");
    2222                        if (should_throw) {
    2323                                throw NotRaisedException();
  • doc/theses/andrew_beach_MMath/code/cross-finally.cfa

    ra5a6a1a8 r866cad3  
    1111int main(int argc, char * argv[]) {
    1212        unsigned int times = 1;
    13         bool should_throw = false;
     13        volatile bool should_throw = false;
    1414        if (1 < argc) {
    1515                times = strtol(argv[1], 0p, 10);
     
    1919        for (unsigned int count = 0 ; count < times ; ++count) {
    2020                try {
    21                         asm volatile ("# try block" : "=rm" (should_throw));
     21                        asm volatile ("# try block");
    2222                        if (should_throw) {
    2323                                throw (not_raised_exception){&not_vt};
Note: See TracChangeset for help on using the changeset viewer.