This patch implements trap instructions for mips. The test cases are added.