brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.3 KiB · c0be339 Raw
268 lines · plain
1! RUN: llvm-mc -triple=sparcv9 -mattr=+osa2011 -filetype=obj %s | llvm-objdump --mattr=+osa2011 --no-print-imm-hex -d - | FileCheck %s --check-prefix=BIN2 3!! SPARCv9/SPARC64 BPr branches have different offset encoding from the others,4!! make sure that our offset bits don't trample on other fields.5!! This is particularly important with backwards branches.6 7! BIN:  0: 02 c8 40 01  	brz %g1, 0x48! BIN:  4: 04 c8 40 01  	brlez %g1, 0x89! BIN:  8: 06 c8 40 01  	brlz %g1, 0xc10! BIN:  c: 0a c8 40 01  	brnz %g1, 0x1011! BIN: 10: 0c c8 40 01  	brgz %g1, 0x1412! BIN: 14: 0e c8 40 01  	brgez %g1, 0x1813brz   %g1, .+414brlez %g1, .+415brlz  %g1, .+416brnz  %g1, .+417brgz  %g1, .+418brgez %g1, .+419 20! BIN: 18: 02 f8 7f ff  	brz %g1, 0x1421! BIN: 1c: 04 f8 7f ff  	brlez %g1, 0x1822! BIN: 20: 06 f8 7f ff  	brlz %g1, 0x1c23! BIN: 24: 0a f8 7f ff  	brnz %g1, 0x2024! BIN: 28: 0c f8 7f ff  	brgz %g1, 0x2425! BIN: 2c: 0e f8 7f ff  	brgez %g1, 0x2826brz   %g1, .-427brlez %g1, .-428brlz  %g1, .-429brnz  %g1, .-430brgz  %g1, .-431brgez %g1, .-432 33!! Similarly, OSA2011 CBCond branches have different offset encoding,34!! make sure that our offset bits don't trample on other fields.35!! This is particularly important with backwards branches.36 37!BIN: 30: 32 c2 00 29  	cwbne	%o0, %o1, 0x3438!BIN: 34: 12 c2 00 29  	cwbe	%o0, %o1, 0x3839!BIN: 38: 34 c2 00 29  	cwbg	%o0, %o1, 0x3c40!BIN: 3c: 14 c2 00 29  	cwble	%o0, %o1, 0x4041!BIN: 40: 36 c2 00 29  	cwbge	%o0, %o1, 0x4442!BIN: 44: 16 c2 00 29  	cwbl	%o0, %o1, 0x4843!BIN: 48: 38 c2 00 29  	cwbgu	%o0, %o1, 0x4c44!BIN: 4c: 18 c2 00 29  	cwbleu	%o0, %o1, 0x5045!BIN: 50: 3a c2 00 29  	cwbcc	%o0, %o1, 0x5446!BIN: 54: 1a c2 00 29  	cwbcs	%o0, %o1, 0x5847!BIN: 58: 3c c2 00 29  	cwbpos	%o0, %o1, 0x5c48!BIN: 5c: 1c c2 00 29  	cwbneg	%o0, %o1, 0x6049!BIN: 60: 3e c2 00 29  	cwbvc	%o0, %o1, 0x6450!BIN: 64: 1e c2 00 29  	cwbvs	%o0, %o1, 0x6851cwbne  %o0, %o1, .+452cwbe   %o0, %o1, .+453cwbg   %o0, %o1, .+454cwble  %o0, %o1, .+455cwbge  %o0, %o1, .+456cwbl   %o0, %o1, .+457cwbgu  %o0, %o1, .+458cwbleu %o0, %o1, .+459cwbcc  %o0, %o1, .+460cwbcs  %o0, %o1, .+461cwbpos %o0, %o1, .+462cwbneg %o0, %o1, .+463cwbvc  %o0, %o1, .+464cwbvs  %o0, %o1, .+465 66!BIN: 68: 32 da 1f e9  	cwbne	%o0, %o1, 0x6467!BIN: 6c: 12 da 1f e9  	cwbe	%o0, %o1, 0x6868!BIN: 70: 34 da 1f e9  	cwbg	%o0, %o1, 0x6c69!BIN: 74: 14 da 1f e9  	cwble	%o0, %o1, 0x7070!BIN: 78: 36 da 1f e9  	cwbge	%o0, %o1, 0x7471!BIN: 7c: 16 da 1f e9  	cwbl	%o0, %o1, 0x7872!BIN: 80: 38 da 1f e9  	cwbgu	%o0, %o1, 0x7c73!BIN: 84: 18 da 1f e9  	cwbleu	%o0, %o1, 0x8074!BIN: 88: 3a da 1f e9  	cwbcc	%o0, %o1, 0x8475!BIN: 8c: 1a da 1f e9  	cwbcs	%o0, %o1, 0x8876!BIN: 90: 3c da 1f e9  	cwbpos	%o0, %o1, 0x8c77!BIN: 94: 1c da 1f e9  	cwbneg	%o0, %o1, 0x9078!BIN: 98: 3e da 1f e9  	cwbvc	%o0, %o1, 0x9479!BIN: 9c: 1e da 1f e9  	cwbvs	%o0, %o1, 0x9880cwbne  %o0, %o1, .-481cwbe   %o0, %o1, .-482cwbg   %o0, %o1, .-483cwble  %o0, %o1, .-484cwbge  %o0, %o1, .-485cwbl   %o0, %o1, .-486cwbgu  %o0, %o1, .-487cwbleu %o0, %o1, .-488cwbcc  %o0, %o1, .-489cwbcs  %o0, %o1, .-490cwbpos %o0, %o1, .-491cwbneg %o0, %o1, .-492cwbvc  %o0, %o1, .-493cwbvs  %o0, %o1, .-494 95!BIN: a0: 32 c2 20 21  	cwbne	%o0, 1, 0xa496!BIN: a4: 12 c2 20 21  	cwbe	%o0, 1, 0xa897!BIN: a8: 34 c2 20 21  	cwbg	%o0, 1, 0xac98!BIN: ac: 14 c2 20 21  	cwble	%o0, 1, 0xb099!BIN: b0: 36 c2 20 21  	cwbge	%o0, 1, 0xb4100!BIN: b4: 16 c2 20 21  	cwbl	%o0, 1, 0xb8101!BIN: b8: 38 c2 20 21  	cwbgu	%o0, 1, 0xbc102!BIN: bc: 18 c2 20 21  	cwbleu	%o0, 1, 0xc0103!BIN: c0: 3a c2 20 21  	cwbcc	%o0, 1, 0xc4104!BIN: c4: 1a c2 20 21  	cwbcs	%o0, 1, 0xc8105!BIN: c8: 3c c2 20 21  	cwbpos	%o0, 1, 0xcc106!BIN: cc: 1c c2 20 21  	cwbneg	%o0, 1, 0xd0107!BIN: d0: 3e c2 20 21  	cwbvc	%o0, 1, 0xd4108!BIN: d4: 1e c2 20 21  	cwbvs	%o0, 1, 0xd8109cwbne  %o0, 1, .+4110cwbe   %o0, 1, .+4111cwbg   %o0, 1, .+4112cwble  %o0, 1, .+4113cwbge  %o0, 1, .+4114cwbl   %o0, 1, .+4115cwbgu  %o0, 1, .+4116cwbleu %o0, 1, .+4117cwbcc  %o0, 1, .+4118cwbcs  %o0, 1, .+4119cwbpos %o0, 1, .+4120cwbneg %o0, 1, .+4121cwbvc  %o0, 1, .+4122cwbvs  %o0, 1, .+4123 124!BIN:  d8: 32 da 3f e1  	cwbne	%o0, 1, 0xd4125!BIN:  dc: 12 da 3f e1  	cwbe	%o0, 1, 0xd8126!BIN:  e0: 34 da 3f e1  	cwbg	%o0, 1, 0xdc127!BIN:  e4: 14 da 3f e1  	cwble	%o0, 1, 0xe0128!BIN:  e8: 36 da 3f e1  	cwbge	%o0, 1, 0xe4129!BIN:  ec: 16 da 3f e1  	cwbl	%o0, 1, 0xe8130!BIN:  f0: 38 da 3f e1  	cwbgu	%o0, 1, 0xec131!BIN:  f4: 18 da 3f e1  	cwbleu	%o0, 1, 0xf0132!BIN:  f8: 3a da 3f e1  	cwbcc	%o0, 1, 0xf4133!BIN:  fc: 1a da 3f e1  	cwbcs	%o0, 1, 0xf8134!BIN: 100: 3c da 3f e1  	cwbpos	%o0, 1, 0xfc135!BIN: 104: 1c da 3f e1  	cwbneg	%o0, 1, 0x100136!BIN: 108: 3e da 3f e1  	cwbvc	%o0, 1, 0x104137!BIN: 10c: 1e da 3f e1  	cwbvs	%o0, 1, 0x108138cwbne  %o0, 1, .-4139cwbe   %o0, 1, .-4140cwbg   %o0, 1, .-4141cwble  %o0, 1, .-4142cwbge  %o0, 1, .-4143cwbl   %o0, 1, .-4144cwbgu  %o0, 1, .-4145cwbleu %o0, 1, .-4146cwbcc  %o0, 1, .-4147cwbcs  %o0, 1, .-4148cwbpos %o0, 1, .-4149cwbneg %o0, 1, .-4150cwbvc  %o0, 1, .-4151cwbvs  %o0, 1, .-4152 153!BIN: 110: 32 e2 00 29  	cxbne	%o0, %o1, 0x114154!BIN: 114: 12 e2 00 29  	cxbe	%o0, %o1, 0x118155!BIN: 118: 34 e2 00 29  	cxbg	%o0, %o1, 0x11c156!BIN: 11c: 14 e2 00 29  	cxble	%o0, %o1, 0x120157!BIN: 120: 36 e2 00 29  	cxbge	%o0, %o1, 0x124158!BIN: 124: 16 e2 00 29  	cxbl	%o0, %o1, 0x128159!BIN: 128: 38 e2 00 29  	cxbgu	%o0, %o1, 0x12c160!BIN: 12c: 18 e2 00 29  	cxbleu	%o0, %o1, 0x130161!BIN: 130: 3a e2 00 29  	cxbcc	%o0, %o1, 0x134162!BIN: 134: 1a e2 00 29  	cxbcs	%o0, %o1, 0x138163!BIN: 138: 3c e2 00 29  	cxbpos	%o0, %o1, 0x13c164!BIN: 13c: 1c e2 00 29  	cxbneg	%o0, %o1, 0x140165!BIN: 140: 3e e2 00 29  	cxbvc	%o0, %o1, 0x144166!BIN: 144: 1e e2 00 29  	cxbvs	%o0, %o1, 0x148167cxbne  %o0, %o1, .+4168cxbe   %o0, %o1, .+4169cxbg   %o0, %o1, .+4170cxble  %o0, %o1, .+4171cxbge  %o0, %o1, .+4172cxbl   %o0, %o1, .+4173cxbgu  %o0, %o1, .+4174cxbleu %o0, %o1, .+4175cxbcc  %o0, %o1, .+4176cxbcs  %o0, %o1, .+4177cxbpos %o0, %o1, .+4178cxbneg %o0, %o1, .+4179cxbvc  %o0, %o1, .+4180cxbvs  %o0, %o1, .+4181 182!BIN: 148: 32 fa 1f e9  	cxbne	%o0, %o1, 0x144183!BIN: 14c: 12 fa 1f e9  	cxbe	%o0, %o1, 0x148184!BIN: 150: 34 fa 1f e9  	cxbg	%o0, %o1, 0x14c185!BIN: 154: 14 fa 1f e9  	cxble	%o0, %o1, 0x150186!BIN: 158: 36 fa 1f e9  	cxbge	%o0, %o1, 0x154187!BIN: 15c: 16 fa 1f e9  	cxbl	%o0, %o1, 0x158188!BIN: 160: 38 fa 1f e9  	cxbgu	%o0, %o1, 0x15c189!BIN: 164: 18 fa 1f e9  	cxbleu	%o0, %o1, 0x160190!BIN: 168: 3a fa 1f e9  	cxbcc	%o0, %o1, 0x164191!BIN: 16c: 1a fa 1f e9  	cxbcs	%o0, %o1, 0x168192!BIN: 170: 3c fa 1f e9  	cxbpos	%o0, %o1, 0x16c193!BIN: 174: 1c fa 1f e9  	cxbneg	%o0, %o1, 0x170194!BIN: 178: 3e fa 1f e9  	cxbvc	%o0, %o1, 0x174195!BIN: 17c: 1e fa 1f e9  	cxbvs	%o0, %o1, 0x178196cxbne  %o0, %o1, .-4197cxbe   %o0, %o1, .-4198cxbg   %o0, %o1, .-4199cxble  %o0, %o1, .-4200cxbge  %o0, %o1, .-4201cxbl   %o0, %o1, .-4202cxbgu  %o0, %o1, .-4203cxbleu %o0, %o1, .-4204cxbcc  %o0, %o1, .-4205cxbcs  %o0, %o1, .-4206cxbpos %o0, %o1, .-4207cxbneg %o0, %o1, .-4208cxbvc  %o0, %o1, .-4209cxbvs  %o0, %o1, .-4210 211!BIN: 180: 32 e2 20 21  	cxbne	%o0, 1, 0x184212!BIN: 184: 12 e2 20 21  	cxbe	%o0, 1, 0x188213!BIN: 188: 34 e2 20 21  	cxbg	%o0, 1, 0x18c214!BIN: 18c: 14 e2 20 21  	cxble	%o0, 1, 0x190215!BIN: 190: 36 e2 20 21  	cxbge	%o0, 1, 0x194216!BIN: 194: 16 e2 20 21  	cxbl	%o0, 1, 0x198217!BIN: 198: 38 e2 20 21  	cxbgu	%o0, 1, 0x19c218!BIN: 19c: 18 e2 20 21  	cxbleu	%o0, 1, 0x1a0219!BIN: 1a0: 3a e2 20 21  	cxbcc	%o0, 1, 0x1a4220!BIN: 1a4: 1a e2 20 21  	cxbcs	%o0, 1, 0x1a8221!BIN: 1a8: 3c e2 20 21  	cxbpos	%o0, 1, 0x1ac222!BIN: 1ac: 1c e2 20 21  	cxbneg	%o0, 1, 0x1b0223!BIN: 1b0: 3e e2 20 21  	cxbvc	%o0, 1, 0x1b4224!BIN: 1b4: 1e e2 20 21  	cxbvs	%o0, 1, 0x1b8225cxbne  %o0, 1, .+4226cxbe   %o0, 1, .+4227cxbg   %o0, 1, .+4228cxble  %o0, 1, .+4229cxbge  %o0, 1, .+4230cxbl   %o0, 1, .+4231cxbgu  %o0, 1, .+4232cxbleu %o0, 1, .+4233cxbcc  %o0, 1, .+4234cxbcs  %o0, 1, .+4235cxbpos %o0, 1, .+4236cxbneg %o0, 1, .+4237cxbvc  %o0, 1, .+4238cxbvs  %o0, 1, .+4239 240!BIN: 1b8: 32 fa 3f e1  	cxbne	%o0, 1, 0x1b4241!BIN: 1bc: 12 fa 3f e1  	cxbe	%o0, 1, 0x1b8242!BIN: 1c0: 34 fa 3f e1  	cxbg	%o0, 1, 0x1bc243!BIN: 1c4: 14 fa 3f e1  	cxble	%o0, 1, 0x1c0244!BIN: 1c8: 36 fa 3f e1  	cxbge	%o0, 1, 0x1c4245!BIN: 1cc: 16 fa 3f e1  	cxbl	%o0, 1, 0x1c8246!BIN: 1d0: 38 fa 3f e1  	cxbgu	%o0, 1, 0x1cc247!BIN: 1d4: 18 fa 3f e1  	cxbleu	%o0, 1, 0x1d0248!BIN: 1d8: 3a fa 3f e1  	cxbcc	%o0, 1, 0x1d4249!BIN: 1dc: 1a fa 3f e1  	cxbcs	%o0, 1, 0x1d8250!BIN: 1e0: 3c fa 3f e1  	cxbpos	%o0, 1, 0x1dc251!BIN: 1e4: 1c fa 3f e1  	cxbneg	%o0, 1, 0x1e0252!BIN: 1e8: 3e fa 3f e1  	cxbvc	%o0, 1, 0x1e4253!BIN: 1ec: 1e fa 3f e1  	cxbvs	%o0, 1, 0x1e8254cxbne  %o0, 1, .-4255cxbe   %o0, 1, .-4256cxbg   %o0, 1, .-4257cxble  %o0, 1, .-4258cxbge  %o0, 1, .-4259cxbl   %o0, 1, .-4260cxbgu  %o0, 1, .-4261cxbleu %o0, 1, .-4262cxbcc  %o0, 1, .-4263cxbcs  %o0, 1, .-4264cxbpos %o0, 1, .-4265cxbneg %o0, 1, .-4266cxbvc  %o0, 1, .-4267cxbvs  %o0, 1, .-4268