diff --git a/ebpfcat/ebpf.py b/ebpfcat/ebpf.py
index d0a5d05ab9292e56aea02ab38f4ab499e15c42d0..39abe0901a069edf4d26f243a20d3f08249c65c5 100644
--- a/ebpfcat/ebpf.py
+++ b/ebpfcat/ebpf.py
@@ -579,9 +579,15 @@ class Binary(Expression):
                         + Opcode.LONG * ((r_long or l_long)
                                          if long is None else long),
                         dst, src, 0, 0)
-            else:
+            elif -0x80000000 <= self.right < 0x100000000:
                 self.ebpf.append(self.operator + Opcode.LONG * long,
                                  dst, 0, 0, self.right)
+            else:
+                with self.ebpf.get_free_register(None) as src:
+                    self.ebpf._load_value(src, self.right)
+                    self.ebpf.append(
+                        self.operator + Opcode.REG + Opcode.LONG,
+                        dst, src, 0, 0)
             if orig_dst is None or orig_dst == dst:
                 yield dst, long
                 return
@@ -1203,7 +1209,7 @@ class EBPF:
         raise AssembleError("not enough registers")
 
     def _load_value(self, no, value):
-        if -0x80000000 <= value < 0x80000000:
+        if -0x80000000 <= value < 0x100000000:
             self.append(Opcode.MOV + Opcode.LONG, no, 0, 0, value)
         else:
             self.append(Opcode.DW, no, 0, 0, value & 0xffffffff)
diff --git a/ebpfcat/ebpf_test.py b/ebpfcat/ebpf_test.py
index b837afa0fc80ebe05087ac124ee58fd407c1d46d..7b19d5f5a9894d2aed39b1acebd50115a39e0013 100644
--- a/ebpfcat/ebpf_test.py
+++ b/ebpfcat/ebpf_test.py
@@ -447,7 +447,6 @@ class Tests(TestCase):
         with Else:
             e.r3 = 7
             e.r4 = 3
-        self.maxDiff = None
         self.assertEqual(e.opcodes, [
             Instruction(opcode=O.JGT, dst=2, src=0, off=1, imm=3),
             Instruction(opcode=O.JLE, dst=3, src=0, off=1, imm=2),
@@ -488,11 +487,20 @@ class Tests(TestCase):
         e = EBPF()
         e.r3 = 0x1234567890
         e.r4 = e.get_fd(7)
+        e.r3 = e.r4 + 0x1234567890
+        e.r3 = 0x90000000
+
         self.assertEqual(e.opcodes, [
             Instruction(opcode=24, dst=3, src=0, off=0, imm=878082192),
             Instruction(opcode=0, dst=0, src=0, off=0, imm=18),
             Instruction(opcode=24, dst=4, src=1, off=0, imm=7),
-            Instruction(opcode=0, dst=0, src=0, off=0, imm=0)])
+            Instruction(opcode=0, dst=0, src=0, off=0, imm=0),
+            Instruction(opcode=O.REG+O.LONG+O.MOV, dst=3, src=4, off=0, imm=0),
+            Instruction(opcode=O.DW, dst=0, src=0, off=0, imm=878082192),
+            Instruction(opcode=O.W, dst=0, src=0, off=0, imm=18),
+            Instruction(opcode=O.LONG+O.REG+O.ADD, dst=3, src=0, off=0, imm=0),
+            Instruction(opcode=O.LONG+O.MOV, dst=3, src=0, off=0, imm=2415919104),
+        ])
 
     def test_simple_binary(self):
         e = EBPF()
@@ -649,7 +657,6 @@ class Tests(TestCase):
             e.r8 = e.r1
 
     def test_binary_alloc(self):
-        self.maxDiff = None
         e = EBPF()
         e.r3 = e.r1 - (2 * e.r10)
         e.mH[e.r10 - 10] = 2 * e.r3