2007-08-31 Michael Meissner Dwarakanath Rajagopal * NEWS: Add note about SSE5 being added on i386. 2007-08-31 Michael Meissner Dwarakanath Rajagopal Tony Linthicum * NEWS: Add SSE5 support to NEWS file. * config/tc-i386.h (drex_byte): Add fields to allow process_drex and build_modrm_byte to communicate. (DREX_OC0): New SSE5 macro. (DREX_OC0_MASK): Ditto. (DREX_OC1): Ditto. (DREX_OC1_MASK): Ditto. (DREX_XMEM_X1_X2_X2): Ditto. (DREX_X1_XMEM_X2_X2): Ditto. (DREX_X1_XMEM_X2_X1: Ditto. (DREX_X1_X2_XMEM_X1: Ditto. (DREX_XMEM_X1_X2): Ditto. (DREX_X1_XMEM_X2): Ditto. (drex_byte): New structure to describe the DREX byte. * config/tc-i386.c (process_drex): New function to handle SSE5 DREX bits. (build_modrm_byte): Use the information cached away in process_drex in the case of DREX instructions. (i386_insn): Add drex field. (pi): Add debugging of drex field. (md_assemble): Treat SSE5 like SSE3 in instructions with an immediate byte. Move REX field to DREX if this is a DREX instruction. (process_operands): Add SSE5 support. (build_modrm_byte): Ditto. (output_insn): Ditto. (cpu_arch): Ditto. (i386_align_code): Ditto. 2007-08-31 Michael Meissner Dwarakanath Rajagopal Tony Linthicum * gas/i386/i386.exp (x86-64-sse5): Run SSE5 64-bit tests. (sse5): Do not currently run 32-bit tests. * gas/i386/x86-64-sse5.s: New file for SSE5 support. * gas/i386/x86-64-sse5.d: Ditto. 2007-08-31 Michael Meissner Dwarakanath Rajagopal Tony Linthicum * i386-opc.h (CpuSSE5): New macro. (i386_cpu_flags): Add Drex, Drexv and Drexc. * i386-gen.c (cpu_flag_init): Add CPU_SSE5_FLAGS. (operand_type_init): Add CpuSSE5. (opcode_modifiers): Add Drex, Drexv and Drexc. (i386_opcode_modifier): Ditto. * i386-opc.tbl (fmaddps,fmaddpd,fmaddss,fmaddsd): Define SSE5 instructions here. (fmsubps,fmsubpd,fmsubss,fmsubsd): Ditto. (fnmaddps,fnmaddpd,fnmaddss,fnmaddsd): Ditto. (fnmsubps,fnmsubpd,fnmsubss,fnmsubsd): Ditto. (pmacssww,pmacsww,pmacsswd,pmacswd): Ditto. (pmacssdd,pmacsdd,pmacssdql,pmacssdqh): Ditto. (pmacsdql,pmacsdqh,pmadcsswd,pmadcswd): Ditto. (phaddbw,phaddbd,phaddbq,phaddwd): Ditto. (phaddwq,phadddq,phaddubw,phaddubd): Ditto. (phaddubq,phadduwd,phadduwq,phaddudq): Ditto. (phsubbw,phsubwd,phsubdq): Ditto. (pcmov,pperm,permps,permpd): Ditto. (protb,protw,protd,protq): Ditto. (pshlb,pshlw,pshld,pshlq): Ditto. (pshab,pshaw,pshad,pshaq): Ditto. (comps,comeqps,comltps,comungeps,comleps,comungtps): Ditto. (comunordps,comneps,comneqps,comnltps,comugeps): Ditto. (comnleps,comugtps,comordps,comueqps,comultps): Ditto. (comngeps,comuleps,comngtps,comfalseps,comuneps): Ditto. (comuneqps,comunltps,comgeps,comunleps,comgtps,comtrueps): Ditto. (compd,comeqpd,comltpd,comungepd,comlepd,comungtpd,comunordpd): Ditto. (comnepd,comneqpd,comnltpd,comugepd,comnlepd,comugtpd): Ditto. (comordpd,comueqpd,comultpd,comngepd,comulepd,comngtpd): Ditto. (comfalsepd,comunepd,comuneqpd,comunltpd,comgepd): Ditto. (comunlepd,comgtpd,comtruepd): Ditto. (comss,comeqss,comltss,comungess,comless,comungtss,comunordss): Ditto. (comness,comneqss,comnltss,comugess,comnless,comugtss): Ditto. (comordss,comueqss,comultss,comngess,comuless,comngtss): Ditto. (comfalsess,comuness,comuneqss,comunltss,comgess): Ditto. (comunless,comgtss,comtruess): Ditto. (comsd,comeqsd,comltsd,comungesd,comlesd,comungtsd,comunordsd): Ditto. (comnesd,comneqsd,comnltsd,comugesd,comnlesd,comugtsd): Ditto. (comordsd,comueqsd,comultsd,comngesd,comulesd,comngtsd): Ditto. (comfalsesd,comunesd,comuneqsd,comunltsd,comgesd): Ditto. (comunlesd,comgtsd,comtruesd): Ditto. (pcomub,pcomltub,pcomleub,pcomgtub,pcomgeub,pcomequb): Ditto. (pcomnequb,pcomneub): Ditto. (pcomuw,pcomltuw,pcomleuw,pcomgtuw,pcomgeuw,pcomequw): Ditto. (pcomnequw,pcomneuw): Ditto. (pcomud,pcomltud,pcomleud,pcomgtud,pcomgeud,pcomequd): Ditto. (pcomnequd,pcomneud): Ditto. (pcomuq,pcomltuq,pcomleuq,pcomgtuq,pcomgeuq,pcomequq): Ditto. (pcomnequq,pcomneuq): Ditto. (pcomb,pcomltb,pcomleb,pcomgtb,pcomgeb,pcomeqb): Ditto. (pcomneqb,pcomneb): Ditto. (pcomw,pcomltw,pcomlew,pcomgtw,pcomgew,pcomeqw): Ditto. (pcomneqw,pcomnew): Ditto. (pcomd,pcomltd,pcomled,pcomgtd,pcomged,pcomeqd): Ditto. (pcomneqd,pcomned): Ditto. (pcomq,pcomltq,pcomleq,pcomgtq,pcomgeq): Ditto. (pcomeqq,pcomneqq,pcomneq): Ditto. (pcomtrueb, pcomtruew, pcomtrued, pcomtrueq): Ditto. (pcomtrueub, pcomtrueuw, pcomtrueud, pcomtrueuq): Ditto. (pcomfalseb, pcomfalsew, pcomfalsed, pcomfalseq): Ditto. (pcomfalseub, pcomfalseuw, pcomfalseud, pcomfalseuq): Ditto. (frczps,frczpd,frczss,frczsd): Ditto. (cvtph2ps,cvtps2ph): Ditto. * i386-tbl.h: Regenerate from i386-opc.tbl. * i386-dis.c (libiberty.h): Include to get ARRAY_SIZE. (dis386_move_test): New disassembly support for move from test register instruction that overlaps with SSE5 instructions. (print_insn): Add support for special casing the i386/i486 move from test register instruction that overlaps with the SSE5 0x0f24 4 operand instructions. (OP_DREX_ICMP): New macros for SSE5 DREX handling. (OP_DREX_FCMP): Ditto. (OP_E_extended): Rename from OP_E, add additional argument to skip the DREX byte. (OP_E): Call OP_E_extended. (DREX_REG_MEMORY): New macros for drex handling. (DREX_REG_UNKNOWN): Ditto. (DREX4_OC1): Ditto. (DREX4_NO_OC0): Ditto. (DREX4_MASK): Ditto. (three_byte_table): Add SSE5 instructions. (print_drex_arg): New function to print a DREX register or memory reference. (OP_DREX4): New function for handling DREX 4 argument ops. (OP_DREX3): New function for handling DREX 3 argument ops. (twobyte_has_modrm): 0f{25,7a,7b} all use the modrm byte. (THREE_BYTE_SSE5_0F{24,25,7A,7B}): New macros for initializing 3 byte opcode support for SSE5 instructions. (OPC_EXT_{44,45}): Remove OPC_EXT_$$ and rename OPC_EXT_45 to OPC_EXT_44. (dis386_twobyte): Add SSE5 24/25/7a/7b support. (three_byte_table): Add rows for describing SSE5 instructions. * Makefile.am (i386-dis.lo): Add $(INCDIR)/libiberty.h. * Makefile.in (i386-dis.lo): Add $(INCDIR)/libiberty.h.