• Russ Cox's avatar
    5c: do not use R9 and R10 · c475c307
    Russ Cox authored
    This program used to use R9 and R10.
    Now it fails to compile (out of registers).
    I used to know a simpler test but can't remember it.
    
    Learned something new: Rietveld refuses change
    list descriptions bigger than 10 kB.
    
    int sum(int x, int y, int z, int w) {
            return
            (((((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))))/
            ((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))))%
            (((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))))/
            ((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))))))*
            ((((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))))/
            ((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))))%
            (((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))))/
            ((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))))))*
            (((((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))))/
            ((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))))%
            (((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))))/
            ((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))))))*
            ((((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))))/
            ((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))))%
            (((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))))/
            ((((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))|
            (((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w))&
            ((x*y+z*w|x*y+z*w)^
            (x*y+z*w|x*y+z*w)))))))
            ;
    }
    
    R=ken2
    CC=golang-dev
    https://golang.org/cl/4650053
    c475c307
txt.c 20.8 KB