source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldra.rb | Ruby | apache-2.0 | 95 | main | 969 | module AArch64
module Instructions
# LDRAA, LDRAB -- A64
# Load Register, with pointer authentication
# LDRAA <Xt>, [<Xn|SP>{, #<simm>}]
# LDRAA <Xt>, [<Xn|SP>{, #<simm>}]!
# LDRAB <Xt>, [<Xn|SP>{, #<simm>}]
# LDRAB <Xt>, [<Xn|SP>{, #<simm>}]!
class LDRA < Instruction
def initial... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/str_imm_gen.rb | Ruby | apache-2.0 | 95 | main | 986 | module AArch64
module Instructions
# STR (immediate) -- A64
# Store Register (immediate)
# STR <Wt>, [<Xn|SP>], #<simm>
# STR <Xt>, [<Xn|SP>], #<simm>
# STR <Wt>, [<Xn|SP>, #<simm>]!
# STR <Xt>, [<Xn|SP>, #<simm>]!
# STR <Wt>, [<Xn|SP>{, #<pimm>}]
# STR <Xt>, [<Xn|SP>{, #<pimm>}]... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/smc.rb | Ruby | apache-2.0 | 95 | main | 418 | module AArch64
module Instructions
# SMC -- A64
# Secure Monitor Call
# SMC #<imm>
class SMC < Instruction
def initialize imm16
@imm16 = check_mask(imm16, 0xffff)
end
def encode _
SMC(@imm16)
end
private
def SMC imm16
insn = 0b11010100_00... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/sys.rb | Ruby | apache-2.0 | 95 | main | 746 | module AArch64
module Instructions
# SYS -- A64
# System instruction
# SYS #<op1>, <Cn>, <Cm>, #<op2>{, <Xt>}
class SYS < Instruction
def initialize op1, cn, cm, op2, xt
@op1 = check_mask(op1, 0x07)
@cn = check_mask(cn, 0x0f)
@cm = check_mask(cm, 0x0f)
@op2 = c... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/stlxrh.rb | Ruby | apache-2.0 | 95 | main | 606 | module AArch64
module Instructions
# STLXRH -- A64
# Store-Release Exclusive Register Halfword
# STLXRH <Ws>, <Wt>, [<Xn|SP>{,#0}]
class STLXRH < Instruction
def initialize rs, rt, rn
@rs = check_mask(rs, 0x1f)
@rt = check_mask(rt, 0x1f)
@rn = check_mask(rn, 0x1f)
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/tsb.rb | Ruby | apache-2.0 | 95 | main | 237 | module AArch64
module Instructions
# TSB CSYNC -- A64
# Trace Synchronization Barrier
# TSB CSYNC
class TSB < Instruction
def encode _
0b1101010100_0_00_011_0010_0010_010_11111
end
end
end
end |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/stxrh.rb | Ruby | apache-2.0 | 95 | main | 593 | module AArch64
module Instructions
# STXRH -- A64
# Store Exclusive Register Halfword
# STXRH <Ws>, <Wt>, [<Xn|SP>{,#0}]
class STXRH < Instruction
def initialize rs, rt, rn
@rs = check_mask(rs, 0x1f)
@rt = check_mask(rt, 0x1f)
@rn = check_mask(rn, 0x1f)
end
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/strh_reg.rb | Ruby | apache-2.0 | 95 | main | 828 | module AArch64
module Instructions
# STRH (register) -- A64
# Store Register Halfword (register)
# STRH <Wt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]
class STRH_reg < Instruction
def initialize rt, rn, rm, option, s
@rt = check_mask(rt, 0x1f)
@rn = check_mask(rn, 0... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/casp.rb | Ruby | apache-2.0 | 95 | main | 1,300 | module AArch64
module Instructions
# CASP, CASPA, CASPAL, CASPL -- A64
# Compare and Swap Pair of words or doublewords in memory
# CASP <Ws>, <W(s+1)>, <Wt>, <W(t+1)>, [<Xn|SP>{,#0}]
# CASPA <Ws>, <W(s+1)>, <Wt>, <W(t+1)>, [<Xn|SP>{,#0}]
# CASPAL <Ws>, <W(s+1)>, <Wt>, <W(t+1)>, [<Xn|SP>{,#0}]
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldrb_reg.rb | Ruby | apache-2.0 | 95 | main | 871 | module AArch64
module Instructions
# LDRB (register) -- A64
# Load Register Byte (register)
# LDRB <Wt>, [<Xn|SP>, (<Wm>|<Xm>), <extend> {<amount>}]
# LDRB <Wt>, [<Xn|SP>, <Xm>{, LSL <amount>}]
class LDRB_reg < Instruction
def initialize rt, rn, rm, s, option
@rt = check_mask(r... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/bic_log_shift.rb | Ruby | apache-2.0 | 95 | main | 971 | module AArch64
module Instructions
# BIC (shifted register) -- A64
# Bitwise Bit Clear (shifted register)
# BIC <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
# BIC <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
class BIC_log_shift < Instruction
def initialize d, n, m, shift, amount, sf
@d = ch... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/rev.rb | Ruby | apache-2.0 | 95 | main | 654 | module AArch64
module Instructions
# REV -- A64
# Reverse Bytes
# REV <Wd>, <Wn>
# REV <Xd>, <Xn>
class REV < Instruction
def initialize rd, rn, sf, opc
@rd = check_mask(rd, 0x1f)
@rn = check_mask(rn, 0x1f)
@sf = check_mask(sf, 0x01)
@opc = check_mask(opc... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldumax.rb | Ruby | apache-2.0 | 95 | main | 1,149 | module AArch64
module Instructions
# LDUMAX, LDUMAXA, LDUMAXAL, LDUMAXL -- A64
# Atomic unsigned maximum on word or doubleword in memory
# LDUMAX <Ws>, <Wt>, [<Xn|SP>]
# LDUMAXA <Ws>, <Wt>, [<Xn|SP>]
# LDUMAXAL <Ws>, <Wt>, [<Xn|SP>]
# LDUMAXL <Ws>, <Wt>, [<Xn|SP>]
# LDUMAX <Xs>, <Xt>,... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/mrs.rb | Ruby | apache-2.0 | 95 | main | 847 | module AArch64
module Instructions
# MRS -- A64
# Move System Register
# MRS <Xt>, (<systemreg>|S<op0>_<op1>_<Cn>_<Cm>_<op2>)
class MRS < Instruction
def initialize o0, op1, crn, crm, op2, rt
@o0 = check_mask(o0, 0x01)
@op1 = check_mask(op1, 0x07)
@crn = check_mask(crn,... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/svc.rb | Ruby | apache-2.0 | 95 | main | 406 | module AArch64
module Instructions
# SVC -- A64
# Supervisor Call
# SVC #<imm>
class SVC < Instruction
def initialize imm
@imm = check_mask(imm, 0xffff)
end
def encode _
SVC(@imm)
end
private
def SVC imm16
insn = 0b11010100_000_0000000000... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/stlxp.rb | Ruby | apache-2.0 | 95 | main | 822 | module AArch64
module Instructions
# STLXP -- A64
# Store-Release Exclusive Pair of registers
# STLXP <Ws>, <Wt1>, <Wt2>, [<Xn|SP>{,#0}]
# STLXP <Ws>, <Xt1>, <Xt2>, [<Xn|SP>{,#0}]
class STLXP < Instruction
def initialize rs, rt, rt2, rn, sz
@rs = check_mask(rs, 0x1f)
@rt ... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/subs.rb | Ruby | apache-2.0 | 95 | main | 276 | module AArch64
module Instructions
module SUBS
autoload :ADDSUB_ext, "aarch64/instructions/subs/addsub_ext"
autoload :ADDSUB_imm, "aarch64/instructions/subs/addsub_imm"
autoload :ADDSUB_shift, "aarch64/instructions/subs/addsub_shift"
end
end
end |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/psb.rb | Ruby | apache-2.0 | 95 | main | 241 | module AArch64
module Instructions
# PSB CSYNC -- A64
# Profiling Synchronization Barrier
# PSB CSYNC
class PSB < Instruction
def encode _
0b1101010100_0_00_011_0010_0010_001_11111
end
end
end
end |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/stxp.rb | Ruby | apache-2.0 | 95 | main | 811 | module AArch64
module Instructions
# STXP -- A64
# Store Exclusive Pair of registers
# STXP <Ws>, <Wt1>, <Wt2>, [<Xn|SP>{,#0}]
# STXP <Ws>, <Xt1>, <Xt2>, [<Xn|SP>{,#0}]
class STXP < Instruction
def initialize rs, rt1, rt2, rn, sf
@rs = check_mask(rs, 0x1f)
@rt1 = check_mas... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/subg.rb | Ruby | apache-2.0 | 95 | main | 701 | module AArch64
module Instructions
# SUBG -- A64
# Subtract with Tag
# SUBG <Xd|SP>, <Xn|SP>, #<uimm6>, #<uimm4>
class SUBG < Instruction
def initialize xd, xn, uimm6, uimm4
@xd = check_mask(xd, 0x1f)
@xn = check_mask(xn, 0x1f)
@uimm6 = check_mask(uimm6, 0x3f)
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldar.rb | Ruby | apache-2.0 | 95 | main | 619 | module AArch64
module Instructions
# LDAR -- A64
# Load-Acquire Register
# LDAR <Wt>, [<Xn|SP>{,#0}]
# LDAR <Xt>, [<Xn|SP>{,#0}]
class LDAR < Instruction
def initialize rt, rn, size
@rt = check_mask(rt, 0x1f)
@rn = check_mask(rn, 0x1f)
@size = check_mask(size, 0... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/cbnz.rb | Ruby | apache-2.0 | 95 | main | 633 | module AArch64
module Instructions
# CBNZ -- A64
# Compare and Branch on Nonzero
# CBNZ <Wt>, <label>
# CBNZ <Xt>, <label>
class CBNZ < Instruction
def initialize rt, label, sf
@rt = check_mask(rt, 0x1f)
@label = label
@sf = check_mask(sf, 0x1)
end
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/stlxr.rb | Ruby | apache-2.0 | 95 | main | 727 | module AArch64
module Instructions
# STLXR -- A64
# Store-Release Exclusive Register
# STLXR <Ws>, <Wt>, [<Xn|SP>{,#0}]
# STLXR <Ws>, <Xt>, [<Xn|SP>{,#0}]
class STLXR < Instruction
def initialize rs, rt, rn, size
@rs = check_mask(rs, 0x1f)
@rt = check_mask(rt, 0x1f)
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldrh_unsigned.rb | Ruby | apache-2.0 | 95 | main | 651 | module AArch64
module Instructions
# LDRH (immediate) -- A64
# Load Register Halfword (immediate)
# LDRH <Wt>, [<Xn|SP>{, #<pimm>}]
class LDRH_unsigned < Instruction
def initialize rt, rn, imm12
@rt = check_mask(rt, 0x1f)
@rn = check_mask(rn, 0x1f)
@imm12 = check_m... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/sysl.rb | Ruby | apache-2.0 | 95 | main | 761 | module AArch64
module Instructions
# SYSL -- A64
# System instruction with result
# SYSL <Xt>, #<op1>, <Cn>, <Cm>, #<op2>
class SYSL < Instruction
def initialize xt, op1, cn, cm, op2
@xt = check_mask(xt, 0x1f)
@op1 = check_mask(op1, 0x07)
@cn = check_mask(cn, 0x0f)
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/xpac.rb | Ruby | apache-2.0 | 95 | main | 536 | module AArch64
module Instructions
# XPACD, XPACI, XPACLRI -- A64
# Strip Pointer Authentication Code
# XPACD <Xd>
# XPACI <Xd>
# XPACLRI
class XPAC < Instruction
def initialize rd, d
@rd = check_mask(rd, 0x1f)
@d = check_mask(d, 0x01)
end
def encode _
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/stxr.rb | Ruby | apache-2.0 | 95 | main | 713 | module AArch64
module Instructions
# STXR -- A64
# Store Exclusive Register
# STXR <Ws>, <Wt>, [<Xn|SP>{,#0}]
# STXR <Ws>, <Xt>, [<Xn|SP>{,#0}]
class STXR < Instruction
def initialize rs, rt, rn, size
@rs = check_mask(rs, 0x1f)
@rt = check_mask(rt, 0x1f)
@rn =... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/brk.rb | Ruby | apache-2.0 | 95 | main | 413 | module AArch64
module Instructions
# BRK -- A64
# Breakpoint instruction
# BRK #<imm>
class BRK < Instruction
def initialize imm
@imm = check_mask(imm, 0xffff)
end
def encode _
BRK(@imm)
end
private
def BRK imm16
insn = 0b11010100_001_000... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/pacdb.rb | Ruby | apache-2.0 | 95 | main | 627 | module AArch64
module Instructions
# PACDB, PACDZB -- A64
# Pointer Authentication Code for Data address, using key B
# PACDB <Xd>, <Xn|SP>
# PACDZB <Xd>
class PACDB < Instruction
def initialize rd, rn, z
@rd = check_mask(rd, 0x1f)
@rn = check_mask(rn, 0x1f)
@z = c... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/bfm.rb | Ruby | apache-2.0 | 95 | main | 817 | module AArch64
module Instructions
# BFM -- A64
# Bitfield Move
# BFM <Wd>, <Wn>, #<immr>, #<imms>
# BFM <Xd>, <Xn>, #<immr>, #<imms>
class BFM < Instruction
def initialize d, n, immr, imms, sf
@d = check_mask(d, 0x1f)
@n = check_mask(n, 0x1f)
@immr = check_ma... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/st64bv.rb | Ruby | apache-2.0 | 95 | main | 607 | module AArch64
module Instructions
# ST64BV -- A64
# Single-copy Atomic 64-byte Store with Return
# ST64BV <Xs>, <Xt>, [<Xn|SP>]
class ST64BV < Instruction
def initialize rs, rt, rn
@rs = check_mask(rs, 0x1f)
@rt = check_mask(rt, 0x1f)
@rn = check_mask(rn, 0x1f)
en... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/smaddl.rb | Ruby | apache-2.0 | 95 | main | 662 | module AArch64
module Instructions
# SMADDL -- A64
# Signed Multiply-Add Long
# SMADDL <Xd>, <Wn>, <Wm>, <Xa>
class SMADDL < Instruction
def initialize rd, rn, rm, ra
@rd = check_mask(rd, 0x1f)
@rn = check_mask(rn, 0x1f)
@rm = check_mask(rm, 0x1f)
@ra = check_mas... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldr_lit_gen.rb | Ruby | apache-2.0 | 95 | main | 666 | module AArch64
module Instructions
# LDR (literal) -- A64
# Load Register (literal)
# LDR <Wt>, <label>
# LDR <Xt>, <label>
class LDR_lit_gen < Instruction
def initialize rt, imm19, size
@rt = check_mask(rt, 0x1f)
@imm19 = imm19
@size = check_mask(size, 0x3)
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/yield.rb | Ruby | apache-2.0 | 95 | main | 207 | module AArch64
module Instructions
# YIELD -- A64
# YIELD
# YIELD
class YIELD < Instruction
def encode _
0b1101010100_0_00_011_0010_0000_001_11111
end
end
end
end |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/stgm.rb | Ruby | apache-2.0 | 95 | main | 492 | module AArch64
module Instructions
# STGM -- A64
# Store Tag Multiple
# STGM <Xt>, [<Xn|SP>]
class STGM < Instruction
def initialize xt, xn
@xt = check_mask(xt, 0x1f)
@xn = check_mask(xn, 0x1f)
end
def encode _
STGM(@xn, @xt)
end
private
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/swp.rb | Ruby | apache-2.0 | 95 | main | 1,082 | module AArch64
module Instructions
# SWP, SWPA, SWPAL, SWPL -- A64
# Swap word or doubleword in memory
# SWP <Ws>, <Wt>, [<Xn|SP>]
# SWPA <Ws>, <Wt>, [<Xn|SP>]
# SWPAL <Ws>, <Wt>, [<Xn|SP>]
# SWPL <Ws>, <Wt>, [<Xn|SP>]
# SWP <Xs>, <Xt>, [<Xn|SP>]
# SWPA <Xs>, <Xt>, [<Xn|SP>]
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldapur_gen.rb | Ruby | apache-2.0 | 95 | main | 843 | module AArch64
module Instructions
# LDAPUR -- A64
# Load-Acquire RCpc Register (unscaled)
# LDAPUR <Wt>, [<Xn|SP>{, #<simm>}]
# LDAPUR <Xt>, [<Xn|SP>{, #<simm>}]
class LDAPUR_gen < Instruction
def initialize size, opc, rt, rn, simm
@size = check_mask(size, 0x03)
@opc = ch... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ret.rb | Ruby | apache-2.0 | 95 | main | 410 | module AArch64
module Instructions
# RET -- A64
# Return from subroutine
# RET {<Xn>}
class RET < Instruction
def initialize reg
@reg = check_mask(reg, 0x1f)
end
def encode _
RET(@reg)
end
private
def RET rn
insn = 0b1101011_0_0_10_11111_... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/sb.rb | Ruby | apache-2.0 | 95 | main | 213 | module AArch64
module Instructions
# SB -- A64
# Speculation Barrier
# SB
class SB < Instruction
def encode _
0b1101010100_0_00_011_0011_0000_1_11_11111
end
end
end
end |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldapr.rb | Ruby | apache-2.0 | 95 | main | 635 | module AArch64
module Instructions
# LDAPR -- A64
# Load-Acquire RCpc Register
# LDAPR <Wt>, [<Xn|SP> {,#0}]
# LDAPR <Xt>, [<Xn|SP> {,#0}]
class LDAPR < Instruction
def initialize rt, rn, size
@rt = check_mask(rt, 0x1f)
@rn = check_mask(rn, 0x1f)
@size = check_m... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/str_reg_gen.rb | Ruby | apache-2.0 | 95 | main | 980 | module AArch64
module Instructions
# STR (register) -- A64
# Store Register (register)
# STR <Wt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]
# STR <Xt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]
class STR_reg_gen < Instruction
def initialize rt, rn, rm, option, s, size
@rt ... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldtr.rb | Ruby | apache-2.0 | 95 | main | 728 | module AArch64
module Instructions
# LDTR -- A64
# Load Register (unprivileged)
# LDTR <Wt>, [<Xn|SP>{, #<simm>}]
# LDTR <Xt>, [<Xn|SP>{, #<simm>}]
class LDTR < Instruction
def initialize rt, rn, imm9, size
@rt = check_mask(rt, 0x1f)
@rn = check_mask(rn, 0x1f)
@... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldrsb_unsigned.rb | Ruby | apache-2.0 | 95 | main | 939 | module AArch64
module Instructions
# LDRSB (immediate) -- A64
# Load Register Signed Byte (immediate)
# LDRSB <Wt>, [<Xn|SP>], #<simm>
# LDRSB <Xt>, [<Xn|SP>], #<simm>
# LDRSB <Wt>, [<Xn|SP>, #<simm>]!
# LDRSB <Xt>, [<Xn|SP>, #<simm>]!
# LDRSB <Wt>, [<Xn|SP>{, #<pimm>}]
# LDRSB <... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldrsh_reg.rb | Ruby | apache-2.0 | 95 | main | 990 | module AArch64
module Instructions
# LDRSH (register) -- A64
# Load Register Signed Halfword (register)
# LDRSH <Wt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]
# LDRSH <Xt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]
class LDRSH_reg < Instruction
def initialize rt, rn, rm, s, option... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/lduminh.rb | Ruby | apache-2.0 | 95 | main | 903 | module AArch64
module Instructions
# LDUMINH, LDUMINAH, LDUMINALH, LDUMINLH -- A64
# Atomic unsigned minimum on halfword in memory
# LDUMINAH <Ws>, <Wt>, [<Xn|SP>]
# LDUMINALH <Ws>, <Wt>, [<Xn|SP>]
# LDUMINH <Ws>, <Wt>, [<Xn|SP>]
# LDUMINLH <Ws>, <Wt>, [<Xn|SP>]
class LDUMINH < Instruc... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/wfet.rb | Ruby | apache-2.0 | 95 | main | 401 | module AArch64
module Instructions
# WFET -- A64
# Wait For Event with Timeout
# WFET <Xt>
class WFET < Instruction
def initialize rd
@rd = check_mask(rd, 0x1f)
end
def encode _
WFET(@rd)
end
private
def WFET rd
insn = 0b11010101000000110... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/irg.rb | Ruby | apache-2.0 | 95 | main | 568 | module AArch64
module Instructions
# IRG -- A64
# Insert Random Tag
# IRG <Xd|SP>, <Xn|SP>{, <Xm>}
class IRG < Instruction
def initialize rd, rn, rm
@rd = check_mask(rd, 0x1f)
@rn = check_mask(rn, 0x1f)
@rm = check_mask(rm, 0x1f)
end
def encode _
IRG... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldtrh.rb | Ruby | apache-2.0 | 95 | main | 614 | module AArch64
module Instructions
# LDTRH -- A64
# Load Register Halfword (unprivileged)
# LDTRH <Wt>, [<Xn|SP>{, #<simm>}]
class LDTRH < Instruction
def initialize rt, rn, imm9
@rt = check_mask(rt, 0x1f)
@rn = check_mask(rn, 0x1f)
@imm9 = check_mask(imm9, 0x1ff)
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/blr.rb | Ruby | apache-2.0 | 95 | main | 406 | module AArch64
module Instructions
# BLR -- A64
# Branch with Link to Register
# BLR <Xn>
class BLR < Instruction
def initialize n
@n = check_mask(n, 0x1f)
end
def encode _
BLR(@n)
end
private
def BLR rn
insn = 0b1101011_0_0_01_11111_0000... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/subp.rb | Ruby | apache-2.0 | 95 | main | 570 | module AArch64
module Instructions
# SUBP -- A64
# Subtract Pointer
# SUBP <Xd>, <Xn|SP>, <Xm|SP>
class SUBP < Instruction
def initialize xd, xn, xm
@xd = check_mask(xd, 0x1f)
@xn = check_mask(xn, 0x1f)
@xm = check_mask(xm, 0x1f)
end
def encode _
SUB... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ldumaxb.rb | Ruby | apache-2.0 | 95 | main | 899 | module AArch64
module Instructions
# LDUMAXB, LDUMAXAB, LDUMAXALB, LDUMAXLB -- A64
# Atomic unsigned maximum on byte in memory
# LDUMAXAB <Ws>, <Wt>, [<Xn|SP>]
# LDUMAXALB <Ws>, <Wt>, [<Xn|SP>]
# LDUMAXB <Ws>, <Wt>, [<Xn|SP>]
# LDUMAXLB <Ws>, <Wt>, [<Xn|SP>]
class LDUMAXB < Instruction... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ubfm.rb | Ruby | apache-2.0 | 95 | main | 838 | module AArch64
module Instructions
# UBFM -- A64
# Unsigned Bitfield Move
# UBFM <Wd>, <Wn>, #<immr>, #<imms>
# UBFM <Xd>, <Xn>, #<immr>, #<imms>
class UBFM < Instruction
def initialize rd, rn, immr, imms, sf
@rd = check_mask(rd, 0x1f)
@rn = check_mask(rn, 0x1f)
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/esb.rb | Ruby | apache-2.0 | 95 | main | 225 | module AArch64
module Instructions
# ESB -- A64
# Error Synchronization Barrier
# ESB
class ESB < Instruction
def encode _
0b1101010100_0_00_011_0010_0010_000_11111
end
end
end
end |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ccmp_imm.rb | Ruby | apache-2.0 | 95 | main | 847 | module AArch64
module Instructions
# CCMP (immediate) -- A64
# Conditional Compare (immediate)
# CCMP <Wn>, #<imm>, #<nzcv>, <cond>
# CCMP <Xn>, #<imm>, #<nzcv>, <cond>
class CCMP_imm < Instruction
def initialize rn, imm, nzcv, cond, sf
@rn = check_mask(rn, 0x1f)
@imm = ... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ccmn_reg.rb | Ruby | apache-2.0 | 95 | main | 843 | module AArch64
module Instructions
# CCMN (register) -- A64
# Conditional Compare Negative (register)
# CCMN <Wn>, <Wm>, #<nzcv>, <cond>
# CCMN <Xn>, <Xm>, #<nzcv>, <cond>
class CCMN_reg < Instruction
def initialize rn, rm, nzcv, cond, sf
@rn = check_mask(rn, 0x1f)
@rm ... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/udiv.rb | Ruby | apache-2.0 | 95 | main | 665 | module AArch64
module Instructions
# UDIV -- A64
# Unsigned Divide
# UDIV <Wd>, <Wn>, <Wm>
# UDIV <Xd>, <Xn>, <Xm>
class UDIV < Instruction
def initialize rd, rn, rm, sf
@rd = check_mask(rd, 0x1f)
@rn = check_mask(rn, 0x1f)
@rm = check_mask(rm, 0x1f)
@sf = c... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/eor/log_shift.rb | Ruby | apache-2.0 | 95 | main | 1,046 | module AArch64
module Instructions
module EOR
# EOR (shifted register) -- A64
# Bitwise Exclusive OR (shifted register)
# EOR <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
# EOR <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
class LOG_shift < Instruction
def initialize rd, rn, rm, shift, im... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/eor/log_imm.rb | Ruby | apache-2.0 | 95 | main | 978 | module AArch64
module Instructions
module EOR
# EOR (immediate) -- A64
# Bitwise Exclusive OR (immediate)
# EOR <Wd|WSP>, <Wn>, #<imm>
# EOR <Xd|SP>, <Xn>, #<imm>
class LOG_imm < Instruction
def initialize rd, rn, immr, imms, n, sf
@rd = check_mask(rd, 0x1f)
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ands/log_shift.rb | Ruby | apache-2.0 | 95 | main | 1,070 | module AArch64
module Instructions
module ANDS
# ANDS (shifted register) -- A64
# Bitwise AND (shifted register), setting flags
# ANDS <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
# ANDS <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
class LOG_shift < Instruction
def initialize xd, xn, xm,... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/ands/log_imm.rb | Ruby | apache-2.0 | 95 | main | 983 | module AArch64
module Instructions
module ANDS
# ANDS (immediate) -- A64
# Bitwise AND (immediate), setting flags
# ANDS <Wd>, <Wn>, #<imm>
# ANDS <Xd>, <Xn>, #<imm>
class LOG_imm < Instruction
def initialize rd, rn, immr, imms, n, sf
@rd = check_mask(rd, 0x1f)
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/adds/addsub_shift.rb | Ruby | apache-2.0 | 95 | main | 1,072 | module AArch64
module Instructions
module ADDS
# ADDS (shifted register) -- A64
# Add (shifted register), setting flags
# ADDS <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
# ADDS <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
class ADDSUB_shift < Instruction
def initialize xd, xn, xm, shif... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/adds/addsub_imm.rb | Ruby | apache-2.0 | 95 | main | 933 | module AArch64
module Instructions
module ADDS
# ADDS (immediate) -- A64
# Add (immediate), setting flags
# ADDS <Wd>, <Wn|WSP>, #<imm>{, <shift>}
# ADDS <Xd>, <Xn|SP>, #<imm>{, <shift>}
class ADDSUB_imm < Instruction
def initialize d, n, imm, shift, sf
@d = c... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/adds/addsub_ext.rb | Ruby | apache-2.0 | 95 | main | 1,080 | module AArch64
module Instructions
module ADDS
# ADDS (extended register) -- A64
# Add (extended register), setting flags
# ADDS <Wd>, <Wn|WSP>, <Wm>{, <extend> {#<amount>}}
# ADDS <Xd>, <Xn|SP>, <R><m>{, <extend> {#<amount>}}
class ADDSUB_ext < Instruction
def initialize d... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/orn/log_shift.rb | Ruby | apache-2.0 | 95 | main | 1,040 | module AArch64
module Instructions
module ORN
# ORN (shifted register) -- A64
# Bitwise OR NOT (shifted register)
# ORN <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
# ORN <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
class LOG_shift < Instruction
def initialize rd, rn, rm, shift, imm6, sf... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/and/log_imm.rb | Ruby | apache-2.0 | 95 | main | 969 | module AArch64
module Instructions
module AND
# AND (immediate) -- A64
# Bitwise AND (immediate)
# AND <Wd|WSP>, <Wn>, #<imm>
# AND <Xd|SP>, <Xn>, #<imm>
class LOG_imm < Instruction
def initialize rd, rn, immr, imms, n, sf
@rd = check_mask(rd, 0x1f)
@r... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/and/log_shift.rb | Ruby | apache-2.0 | 95 | main | 1,049 | module AArch64
module Instructions
module AND
# AND (shifted register) -- A64
# Bitwise AND (shifted register)
# AND <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
# AND <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
class LOG_shift < Instruction
def initialize xd, xn, xm, shift, amount, sf
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/sub/addsub_ext.rb | Ruby | apache-2.0 | 95 | main | 1,080 | module AArch64
module Instructions
module SUB
# SUB (extended register) -- A64
# Subtract (extended register)
# SUB <Wd|WSP>, <Wn|WSP>, <Wm>{, <extend> {#<amount>}}
# SUB <Xd|SP>, <Xn|SP>, <R><m>{, <extend> {#<amount>}}
class ADDSUB_ext < Instruction
def initialize rd, rn, ... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/sub/addsub_imm.rb | Ruby | apache-2.0 | 95 | main | 930 | module AArch64
module Instructions
module SUB
# SUB (immediate) -- A64
# Subtract (immediate)
# SUB <Wd|WSP>, <Wn|WSP>, #<imm>{, <shift>}
# SUB <Xd|SP>, <Xn|SP>, #<imm>{, <shift>}
class ADDSUB_imm < Instruction
def initialize rd, rn, imm, shift, sf
@rd = check_... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/sub/addsub_shift.rb | Ruby | apache-2.0 | 95 | main | 1,056 | module AArch64
module Instructions
module SUB
# SUB (shifted register) -- A64
# Subtract (shifted register)
# SUB <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
# SUB <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
class ADDSUB_shift < Instruction
def initialize rd, rn, rm, shift, amount, sf
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/orr/log_imm.rb | Ruby | apache-2.0 | 95 | main | 968 | module AArch64
module Instructions
module ORR
# ORR (immediate) -- A64
# Bitwise OR (immediate)
# ORR <Wd|WSP>, <Wn>, #<imm>
# ORR <Xd|SP>, <Xn>, #<imm>
class LOG_imm < Instruction
def initialize rd, rn, immr, imms, n, sf
@rd = check_mask(rd, 0x1f)
@rn... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/orr/log_shift.rb | Ruby | apache-2.0 | 95 | main | 1,036 | module AArch64
module Instructions
module ORR
# ORR (shifted register) -- A64
# Bitwise OR (shifted register)
# ORR <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
# ORR <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
class LOG_shift < Instruction
def initialize rd, rn, rm, shift, imm6, sf
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/subs/addsub_imm.rb | Ruby | apache-2.0 | 95 | main | 944 | module AArch64
module Instructions
module SUBS
# SUBS (immediate) -- A64
# Subtract (immediate), setting flags
# SUBS <Wd>, <Wn|WSP>, #<imm>{, <shift>}
# SUBS <Xd>, <Xn|SP>, #<imm>{, <shift>}
class ADDSUB_imm < Instruction
def initialize rd, rn, imm, shift, sf
@rd... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/subs/addsub_shift.rb | Ruby | apache-2.0 | 95 | main | 1,077 | module AArch64
module Instructions
module SUBS
# SUBS (shifted register) -- A64
# Subtract (shifted register), setting flags
# SUBS <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
# SUBS <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
class ADDSUB_shift < Instruction
def initialize rd, rn, rm,... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/subs/addsub_ext.rb | Ruby | apache-2.0 | 95 | main | 1,094 | module AArch64
module Instructions
module SUBS
# SUBS (extended register) -- A64
# Subtract (extended register), setting flags
# SUBS <Wd>, <Wn|WSP>, <Wm>{, <extend> {#<amount>}}
# SUBS <Xd>, <Xn|SP>, <R><m>{, <extend> {#<amount>}}
class ADDSUB_ext < Instruction
def initial... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/add/addsub_shift.rb | Ruby | apache-2.0 | 95 | main | 1,051 | module AArch64
module Instructions
module ADD
# ADD (shifted register) -- A64
# Add (shifted register)
# ADD <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
# ADD <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
class ADDSUB_shift < Instruction
def initialize xd, xn, xm, shift, amount, sf
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/add/addsub_imm.rb | Ruby | apache-2.0 | 95 | main | 873 | module AArch64
module Instructions
module ADD
# ADD (immediate) -- A64
# Add (immediate)
# ADD <Wd|WSP>, <Wn|WSP>, #<imm>{, <shift>}
class ADDSUB_imm < Instruction
def initialize rd, rn, imm12, sh, sf
@rd = check_mask(rd, 0x1f)
@rn = check_mask(rn, 0x1f)
... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/instructions/add/addsub_ext.rb | Ruby | apache-2.0 | 95 | main | 1,075 | module AArch64
module Instructions
module ADD
# ADD (extended register) -- A64
# Add (extended register)
# ADD <Wd|WSP>, <Wn|WSP>, <Wm>{, <extend> {#<amount>}}
# ADD <Xd|SP>, <Xn|SP>, <R><m>{, <extend> {#<amount>}}
class ADDSUB_ext < Instruction
def initialize rd, rn, rm, e... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | lib/aarch64/system_registers/mrs_msr_64.rb | Ruby | apache-2.0 | 95 | main | 27,021 | module AArch64
module SystemRegisters
MRS_MSR_64 = Struct.new(:op0, :op1, :CRn, :CRm, :op2)
PStateField = Struct.new(:op0, :op1, :CRn, :CRm, :op2, :imm_op1, :imm_op2)
OSDTRRX_EL1 = MRS_MSR_64.new(0b10, 0b000, 0b0000, 0b0000, 0b010)
MDCCINT_EL1 = MRS_MSR_64.new(0b10, 0b000, 0b0000, 0b0010, 0b000)
M... |
github | tenderlove/aarch64 | https://github.com/tenderlove/aarch64 | bin/build_instructions.rb | Ruby | apache-2.0 | 95 | main | 2,890 | require "nokogiri"
require "erb"
TOP_LEVEL = ERB.new(<<-eoerb, trim_mode: "-")
module AArch64
module Instructions
<%- for fname, klass in files_and_classes do -%>
autoload :<%= klass %>, "aarch64/instructions/<%= fname %>"
<%- end -%>
end
end
eoerb
TEMPLATE = ERB.new(<<-eoerb, trim_mode: "-")
module AArch... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/spec_helper.rb | Ruby | mit | 95 | main | 1,808 | require "climate_control"
require "govuk_docker"
require "yaml"
Dir[File.expand_path("support/**/*.rb", __dir__)].sort.each { |f| require f }
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
config.expect_with :rspec do |expectations|
# Option will default to true i... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/integration/compose/expected_volumes_spec.rb | Ruby | mit | 95 | main | 1,951 | require "spec_helper"
RSpec.describe "Expected volumes" do
def self.rails_projects
rails_service_names = ComposeHelper.rails_app_services.keys
ProjectsHelper.all_projects.select do |project_name|
project_service_names = ComposeHelper.services(project_name).keys
rails_service_names.intersection(p... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/integration/compose/project_stacks_spec.rb | Ruby | mit | 95 | main | 730 | require "spec_helper"
RSpec.describe "Compose project stacks" do
ProjectsHelper.all_projects.each do |project_name|
it "configures #{project_name} with a lite or app stack" do
project_stacks = ComposeHelper.services(project_name)
expect(project_stacks.keys).to include(/lite/)
.or include(/ap... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/integration/compose/rails_debugger_spec.rb | Ruby | mit | 95 | main | 313 | require "spec_helper"
RSpec.describe "Compose rails debugger" do
ComposeHelper.rails_app_services.each do |service_name, service|
it "#{service_name} supports attaching an interactive debugger" do
expect(service["tty"]).to be_truthy
expect(service["stdin_open"]).to be_truthy
end
end
end |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/integration/compose/rails_binding_spec.rb | Ruby | mit | 95 | main | 402 | require "spec_helper"
RSpec.describe "Compose rails host" do
ComposeHelper.rails_app_services.each do |service_name, service|
it "#{service_name} allows connections from the host machine" do
expect(service["environment"]["BINDING"]).to_not be_empty
end
it "#{service_name} exposes the port to the h... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/integration/compose/virtual_hosts_spec.rb | Ruby | mit | 95 | main | 1,077 | require "spec_helper"
RSpec.describe "Compose virtual hosts" do
ComposeHelper.app_services.each do |service_name, service|
it "configures #{service_name} to depend on nginx-proxy" do
expect(service["depends_on"]).to include("nginx-proxy")
end
it "configures #{service_name} to define a VIRTUAL_HOST... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/integration/make/dependencies_spec.rb | Ruby | mit | 95 | main | 1,625 | require "spec_helper"
RSpec.describe "Make dependencies" do
# Some dependencies are only needed by the dependant app for their static files - for example, schemas in publishing api.
let(:dependencies_that_do_not_need_to_be_running) { %w[publishing-api] }
ProjectsHelper.all_projects.each do |project_name|
it... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/govuk_docker/paths_spec.rb | Ruby | mit | 95 | main | 1,282 | require "spec_helper"
RSpec.describe GovukDocker::Paths do
describe "govuk_root_dir" do
subject { described_class.govuk_root_dir }
context "when GOVUK_ROOT_DIR is not set" do
it "uses HOME environment variable" do
ClimateControl.modify GOVUK_ROOT_DIR: nil, HOME: "/home/test" do
expec... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/govuk_docker/doctor/checkup_spec.rb | Ruby | mit | 95 | main | 6,444 | require "spec_helper"
RSpec.describe GovukDocker::Doctor::Checkup do
let(:service_name) { "fake_service" }
let(:messages) do
{
up_to_date: "fake_service is up-to-date",
outdated: "fake_service is outdated",
installed: "fake_service is installed",
not_installed: "fake_service is not inst... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/support/makefile_helper.rb | Ruby | mit | 95 | main | 259 | module MakefileHelper
def self.dependencies(project_name)
filename = File.join("projects", project_name, "Makefile")
rule = File.readlines(filename).first
dependencies_string = rule.split(":")[1]
dependencies_string.scan(/[^\s]+/)
end
end |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | spec/support/compose_helper.rb | Ruby | mit | 95 | main | 827 | module ComposeHelper
def self.app_services
@app_services ||= all_services.select do |service_name, _service|
service_name =~ /app(-\w+)?$/
end
end
def self.rails_app_services
app_services.select do |_service_name, service|
service["command"] =~ /rails/
end
end
def self.lite_servi... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | lib/govuk_docker/paths.rb | Ruby | mit | 95 | main | 244 | class GovukDocker::Paths
def self.govuk_root_dir
ENV.fetch("GOVUK_ROOT_DIR", File.join(ENV.fetch("HOME"), "govuk"))
end
def self.govuk_docker_dir
ENV.fetch("GOVUK_DOCKER_DIR", File.join(govuk_root_dir, "govuk-docker"))
end
end |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | lib/govuk_docker/doctor/doctor.rb | Ruby | mit | 95 | main | 3,028 | module GovukDocker::Doctor
def self.messages
{
govuk_docker: govuk_docker_messages,
dnsmasq: dnsmasq_messages,
docker: docker_messages,
docker_compose: docker_compose_messages,
}
end
def self.govuk_docker_messages
{
up_to_date: "✅ govuk-docker is up-to-date",
outda... |
github | alphagov/govuk-docker | https://github.com/alphagov/govuk-docker | lib/govuk_docker/doctor/checkup.rb | Ruby | mit | 95 | main | 4,176 | module GovukDocker::Doctor
class Checkup
def initialize(service_name:, checkups:, messages:)
@checkups = checkups
@service_name = service_name
@messages = messages
@return_message = []
end
def call
checkup
generate_return_message
return_message.join("\r\n")
e... |
github | somleng/somleng | https://github.com/somleng/somleng | Gemfile | Ruby | mit | 95 | develop | 2,076 | # frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", "~> 8.1.3"
# For Administrate
gem "administrate", github: "thoughtbot/administrate"
gem "administrate-field-active_storage"
gem "image_processing"
gem "aasm"
gem "active_storage_... |
github | somleng/somleng | https://github.com/somleng/somleng | app/channels/sms_message_channel.rb | Ruby | mit | 95 | develop | 2,687 | class SMSMessageChannel < ApplicationCable::Channel
def subscribed
stream_for(current_sms_gateway)
end
def unsubscribed
# Any cleanup needed when channel is unsubscribed
end
def sent(data)
message = current_sms_gateway.messages.find(data.fetch("id"))
case data.fetch("status")
when "sent... |
github | somleng/somleng | https://github.com/somleng/somleng | app/channels/application_cable/connection.rb | Ruby | mit | 95 | develop | 604 | module ApplicationCable
class Connection < ActionCable::Connection::Base
identified_by :current_sms_gateway
def connect
self.current_sms_gateway = SMSGateway.find_by(device_token: request.headers["X-Device-Key"])
reject_unauthorized_connection if current_sms_gateway.blank?
end
def discon... |
github | somleng/somleng | https://github.com/somleng/somleng | app/jobs/process_cdr_job.rb | Ruby | mit | 95 | develop | 3,344 | class ProcessCDRJob < ApplicationJob
queue_as(AppSettings.fetch(:aws_sqs_medium_priority_queue_name))
class Handler
class PhoneCallNotFoundError < StandardError; end
class UnknownPhoneCallError < StandardError; end
class CDRAlreadyExistsError < StandardError; end
attr_accessor :raw_payload, :cdr, ... |
github | somleng/somleng | https://github.com/somleng/somleng | app/jobs/complete_phone_call_job.rb | Ruby | mit | 95 | develop | 2,525 | class CompletePhoneCallJob < ApplicationJob
class Handler
class InvalidStateTransitionError < StandardError; end
NOT_ANSWERED_SIP_TERM_STATUSES = %w[ 480 487 603 ].freeze
BUSY_SIP_TERM_STATUSES = [ "486" ].freeze
attr_reader :phone_call
def initialize(phone_call)
@phone_call = phone_call
... |
github | somleng/somleng | https://github.com/somleng/somleng | app/jobs/scheduled_job.rb | Ruby | mit | 95 | develop | 771 | class ScheduledJob < ApplicationJob
queue_as AppSettings.fetch(:aws_sqs_high_priority_queue_name)
# Jobs cannot be scheduled more than 15 minutes into the future for SQS.
# See http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html
MAX_DELAY = 15.minutes
def perform(job_cl... |
github | somleng/somleng | https://github.com/somleng/somleng | app/jobs/daily_job.rb | Ruby | mit | 95 | develop | 317 | class DailyJob < ApplicationJob
queue_as AppSettings.fetch(:aws_sqs_low_priority_queue_name)
def perform
ExecuteWorkflowJob.perform_later(ExpireQueuedPhoneCalls.to_s)
ExecuteWorkflowJob.perform_later(PublishInteractionData.to_s)
ExecuteWorkflowJob.perform_later(DeleteExpiredCarriers.to_s)
end
end |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.