process.cc (6420:7d0e7547be5e) | process.cc (6421:1aa0b4673699) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007-2008 The Florida State University 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 482 unchanged lines hidden (view full) --- 491 sizeof(memory_barrier)); 492 493 // This -should- be atomic, but I don't think all the support that we'd 494 // need is implemented. There should also be memory barriers around it. 495 uint8_t cmpxchg[] = 496 { 497 0x00, 0x30, 0x92, 0xe5, //ldr r3, [r2] 498 0x00, 0x30, 0x53, 0xe0, //subs r3, r3, r0 | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007-2008 The Florida State University 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 482 unchanged lines hidden (view full) --- 491 sizeof(memory_barrier)); 492 493 // This -should- be atomic, but I don't think all the support that we'd 494 // need is implemented. There should also be memory barriers around it. 495 uint8_t cmpxchg[] = 496 { 497 0x00, 0x30, 0x92, 0xe5, //ldr r3, [r2] 498 0x00, 0x30, 0x53, 0xe0, //subs r3, r3, r0 |
499 0x00, 0x10, 0x92, 0x05, //streq r1, [r2] | 499 0x00, 0x10, 0x82, 0x05, //streq r1, [r2] |
500 0x03, 0x00, 0xa0, 0xe1, //mov r0, r3 501 0x0e, 0xf0, 0xa0, 0xe1 //usr_ret lr 502 }; 503 tc->getMemPort()->writeBlob(commPage + 0x0fc0, cmpxchg, sizeof(cmpxchg)); 504 505 uint8_t get_tls[] = 506 { 507 0x08, 0x00, 0x9f, 0xe5, //ldr r0, [pc, #(16 - 8)] --- 22 unchanged lines hidden --- | 500 0x03, 0x00, 0xa0, 0xe1, //mov r0, r3 501 0x0e, 0xf0, 0xa0, 0xe1 //usr_ret lr 502 }; 503 tc->getMemPort()->writeBlob(commPage + 0x0fc0, cmpxchg, sizeof(cmpxchg)); 504 505 uint8_t get_tls[] = 506 { 507 0x08, 0x00, 0x9f, 0xe5, //ldr r0, [pc, #(16 - 8)] --- 22 unchanged lines hidden --- |