Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for is32Bit (0.07 sec)

  1. src/cmd/compile/internal/ssa/_gen/PPC64.rules

    // Arithmetic constant ops
    
    (ADD x (MOVDconst <t> [c])) && is32Bit(c) && !t.IsPtr() => (ADDconst [c] x)
    (ADDconst [c] (ADDconst [d] x)) && is32Bit(c+d) => (ADDconst [c+d] x)
    (ADDconst [0] x) => x
    (SUB x (MOVDconst [c])) && is32Bit(-c) => (ADDconst [-c] x)
    
    (ADDconst [c] (MOVDaddr [d] {sym} x)) && is32Bit(c+int64(d)) => (MOVDaddr [int32(c+int64(d))] {sym} x)
    (ADDconst [c] x:(SP)) && is32Bit(c) => (MOVDaddr [int32(c)] x) // so it is rematerializeable
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 53.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/rewrite.go

    // isUint32PowerOfTwo reports whether uint32(n) is a power of 2.
    func isUint32PowerOfTwo(in int64) bool {
    	n := uint64(uint32(in))
    	return n > 0 && n&(n-1) == 0
    }
    
    // is32Bit reports whether n can be represented as a signed 32 bit integer.
    func is32Bit(n int64) bool {
    	return n == int64(int32(n))
    }
    
    // is16Bit reports whether n can be represented as a signed 16 bit integer.
    func is16Bit(n int64) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
Back to top