// Path: src/main/java/fr/broeglin/jmmix/simulator/instructions/InstructionSet.java
// public static void INCH(Processor proc, Memory mem, int x, int y, int z) {
// 	proc.setRegister(x, proc.register(x)
// 			+ ((long) y << 56 | (long) z << 48));
// 	proc.cost(0, 1);
// }
// 
// Path: src/main/java/fr/broeglin/jmmix/simulator/instructions/InstructionSet.java
// public static void INCL(Processor proc, Memory mem, int x, int y, int z) {
// 	proc.setRegister(x, proc.register(x) + (y << 8 | z));
// 	proc.cost(0, 1);
// }
// 
// Path: src/main/java/fr/broeglin/jmmix/simulator/instructions/InstructionSet.java
// public static void INCMH(Processor proc, Memory mem, int x, int y, int z) {
// 	proc.setRegister(x, proc.register(x)
// 			+ ((long) y << 40 | (long) z << 32));
// 	proc.cost(0, 1);
// }
// 
// Path: src/main/java/fr/broeglin/jmmix/simulator/instructions/InstructionSet.java
// public static void INCML(Processor proc, Memory mem, int x, int y, int z) {
// 	proc.setRegister(x, proc.register(x)
// 			+ ((long) y << 24 | (long) z << 16));
// 	proc.cost(0, 1);
// }


import static fr.broeglin.jmmix.simulator.SpecialRegisterName.rR;
import static fr.broeglin.jmmix.simulator.instructions.InstructionSet.INCH;
import static fr.broeglin.jmmix.simulator.instructions.InstructionSet.INCL;
import static fr.broeglin.jmmix.simulator.instructions.InstructionSet.INCMH;
import static fr.broeglin.jmmix.simulator.instructions.InstructionSet.INCML;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import org.junit.Test;
		checkOp(ArithmeticInstructions::DIV, 0x0l, 0x2l, 0x0l);
		checkOp(ArithmeticInstructions::DIV, 0x0l, 0xffff_ffff_ffff_ffffl,
				0x0l);
	}

	@Test
	public void DIV_should_divide() {
		checkOp(ArithmeticInstructions::DIV, 0x2l, 0x4l, 0x2l);
		assertThat(proc.specialRegister(rR), equalTo(0l));

		checkOp(ArithmeticInstructions::DIV, 0x2l, -0x4l, -0x2l);
		assertThat(proc.specialRegister(rR), equalTo(0l));

		checkOp(ArithmeticInstructions::DIV, -0x2l, -0x4l, 0x2l);
		assertThat(proc.specialRegister(rR), equalTo(0l));

		checkOp(ArithmeticInstructions::DIV, 0x0, 0xffff_ffff_ffff_ffffl, 0x2l);
		assertThat(proc.specialRegister(rR), equalTo(-1l));

		checkOp(ArithmeticInstructions::DIV, 0x0, 0xffff_ffff_ffff_ffffl, 0x2l);
		assertThat(proc.specialRegister(rR), equalTo(-1l));

		checkOp(ArithmeticInstructions::DIV, 0x07ff_ffff_ffff_ffffl,
				0x0fff_ffff_ffff_ffffl, 0x2l);
		assertThat(proc.specialRegister(rR), equalTo(1l));

		checkOp(ArithmeticInstructions::DIV, 12l, 1228l, 96l);
		assertThat(proc.specialRegister(rR), equalTo(76l));
	}

// Path: src/main/java/fr/broeglin/jmmix/simulator/instructions/InstructionSet.java
// public static void INCH(Processor proc, Memory mem, int x, int y, int z) {
// 	proc.setRegister(x, proc.register(x)
// 			+ ((long) y << 56 | (long) z << 48));
// 	proc.cost(0, 1);
// }
// 
// Path: src/main/java/fr/broeglin/jmmix/simulator/instructions/InstructionSet.java
// public static void INCL(Processor proc, Memory mem, int x, int y, int z) {
// 	proc.setRegister(x, proc.register(x) + (y << 8 | z));
// 	proc.cost(0, 1);
// }
// 
// Path: src/main/java/fr/broeglin/jmmix/simulator/instructions/InstructionSet.java
// public static void INCMH(Processor proc, Memory mem, int x, int y, int z) {
// 	proc.setRegister(x, proc.register(x)
// 			+ ((long) y << 40 | (long) z << 32));
// 	proc.cost(0, 1);
// }
// 
// Path: src/main/java/fr/broeglin/jmmix/simulator/instructions/InstructionSet.java
// public static void INCML(Processor proc, Memory mem, int x, int y, int z) {
// 	proc.setRegister(x, proc.register(x)
// 			+ ((long) y << 24 | (long) z << 16));
// 	proc.cost(0, 1);
// }


// Path: src/test/java/fr/broeglin/jmmix/simulator/instructions/ArithmeticInstructionsTest.java
import static fr.broeglin.jmmix.simulator.SpecialRegisterName.rR;
import static fr.broeglin.jmmix.simulator.instructions.InstructionSet.INCH;
import static fr.broeglin.jmmix.simulator.instructions.InstructionSet.INCL;
import static fr.broeglin.jmmix.simulator.instructions.InstructionSet.INCMH;
import static fr.broeglin.jmmix.simulator.instructions.InstructionSet.INCML;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import org.junit.Test;

		checkOp(ArithmeticInstructions::DIV, 0x0l, 0x2l, 0x0l);
		checkOp(ArithmeticInstructions::DIV, 0x0l, 0xffff_ffff_ffff_ffffl,
				0x0l);
	}

	@Test
	public void DIV_should_divide() {
		checkOp(ArithmeticInstructions::DIV, 0x2l, 0x4l, 0x2l);
		assertThat(proc.specialRegister(rR), equalTo(0l));

		checkOp(ArithmeticInstructions::DIV, 0x2l, -0x4l, -0x2l);
		assertThat(proc.specialRegister(rR), equalTo(0l));

		checkOp(ArithmeticInstructions::DIV, -0x2l, -0x4l, 0x2l);
		assertThat(proc.specialRegister(rR), equalTo(0l));

		checkOp(ArithmeticInstructions::DIV, 0x0, 0xffff_ffff_ffff_ffffl, 0x2l);
		assertThat(proc.specialRegister(rR), equalTo(-1l));

		checkOp(ArithmeticInstructions::DIV, 0x0, 0xffff_ffff_ffff_ffffl, 0x2l);
		assertThat(proc.specialRegister(rR), equalTo(-1l));

		checkOp(ArithmeticInstructions::DIV, 0x07ff_ffff_ffff_ffffl,
				0x0fff_ffff_ffff_ffffl, 0x2l);
		assertThat(proc.specialRegister(rR), equalTo(1l));

		checkOp(ArithmeticInstructions::DIV, 12l, 1228l, 96l);
		assertThat(proc.specialRegister(rR), equalTo(76l));
	}

	@Test