- Replace '\(\w\)\([+]=\)(' with '\1 \2 ('.
- Replace '\(\w\)\([+]=\)\(\w\)' with '\1 \2 \3'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2364
b42882b7-edfa-0310-969c-
e2dbd0fdcd60
14 files changed:
for (i=0; i< count; i++)
{
target_buffer_set_u32(target, dest, *src);
for (i=0; i< count; i++)
{
target_buffer_set_u32(target, dest, *src);
- for (i=0; i<len; i+=chunk)
+ for (i=0; i<len; i += chunk)
{
int t=len-i;
if (t>chunk)
{
int t=len-i;
if (t>chunk)
duration_stop_measure(&duration, NULL);
t=duration.duration.tv_usec/1000;
duration_stop_measure(&duration, NULL);
t=duration.duration.tv_usec/1000;
- t+=duration.duration.tv_sec*1000;
+ t += duration.duration.tv_sec*1000;
result=0;
pagenum=adr/flash_page_size;
result=0;
pagenum=adr/flash_page_size;
- for (bi=0; bi<bi_end; bi+=flash_page_size/4) {
+ for (bi=0; bi<bi_end; bi += flash_page_size/4) {
result=flash_page_program(buffer+bi, pagenum++);
if (result) break;
}
result=flash_page_program(buffer+bi, pagenum++);
if (result) break;
}
if ((inr(MC_FSR+efc_ofs)&MC_LOCKE)) return FLASH_STAT_LOCKE;
}
if ((inr(MC_FSR+efc_ofs)&MC_LOCKE)) return FLASH_STAT_LOCKE;
}
- if ((page_num+=flash_lock_pages)>flash_page_count) break;
+ if ((page_num += flash_lock_pages)>flash_page_count) break;
- for (i=0; i<ms; i+=napTime)
+ for (i=0; i<ms; i += napTime)
{
int sleep_a_bit=ms-i;
if (sleep_a_bit>napTime)
{
int sleep_a_bit=ms-i;
if (sleep_a_bit>napTime)
{
float t;
t=duration->duration.tv_sec;
{
float t;
t=duration->duration.tv_sec;
- t+=(float)duration->duration.tv_usec/1000000.0;
+ t += (float)duration->duration.tv_usec/1000000.0;
*text = malloc(100);
snprintf(*text, 100, "%fs", t);
}
*text = malloc(100);
snprintf(*text, 100, "%fs", t);
}
long long t=0;
gettimeofday(&now, NULL);
long long t=0;
gettimeofday(&now, NULL);
- t+=now.tv_usec/1000;
- t+=now.tv_sec*1000;
+ t += now.tv_usec/1000;
+ t += now.tv_sec*1000;
/* validate arguments as numbers */
e = JIM_OK;
/* validate arguments as numbers */
e = JIM_OK;
- for (i = 2; i < argc; i+=2)
+ for (i = 2; i < argc; i += 2)
{
long bits;
const char *cp;
{
long bits;
const char *cp;
num_fields=(argc-2)/2;
fields = malloc(sizeof(scan_field_t) * num_fields);
num_fields=(argc-2)/2;
fields = malloc(sizeof(scan_field_t) * num_fields);
- for (i = 2; i < argc; i+=2)
+ for (i = 2; i < argc; i += 2)
field_count=0;
Jim_Obj *list = Jim_NewListObj(interp, NULL, 0);
field_count=0;
Jim_Obj *list = Jim_NewListObj(interp, NULL, 0);
- for (i = 2; i < argc; i+=2)
+ for (i = 2; i < argc; i += 2)
value=0;
if (fields[i].out_value != NULL)
{
value=0;
if (fields[i].out_value != NULL)
{
{
value|=fields[i].out_value[(j+l)/8]<<l;
}
{
value|=fields[i].out_value[(j+l)/8]<<l;
}
// we're shifting in data to MSB, shift data to be aligned for returning the value
value >>= 32-k;
// we're shifting in data to MSB, shift data to be aligned for returning the value
value >>= 32-k;
{
inBuffer[(j+l)/8]=(value>>l)&0xff;
}
}
{
inBuffer[(j+l)/8]=(value>>l)&0xff;
}
}
/* execute num_cycles, 32 at the time. */
int i;
/* execute num_cycles, 32 at the time. */
int i;
- for (i=0; i<num_cycles; i+=32)
+ for (i=0; i<num_cycles; i += 32)
{
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, fast_target_buffer_get_u32(buffer, 1));
shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1<<5));
{
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, fast_target_buffer_get_u32(buffer, 1));
shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1<<5));
{
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, fast_target_buffer_get_u32(buffer, 0));
shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1<<5));
{
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, fast_target_buffer_get_u32(buffer, 0));
shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1<<5));
- for (i = 0; i < str_len; i+=2)
+ for (i = 0; i < str_len; i += 2)
{
uint8_t t = hextoint(tstr[i])<<4;
t |= hextoint(tstr[i+1]);
{
uint8_t t = hextoint(tstr[i])<<4;
t |= hextoint(tstr[i+1]);
/* Handle first & last using standard embeddedice_write_reg and the middle ones w/the
* core function repeated. */
embeddedice_write_reg(&arm7_9->eice_cache->reg_list[EICE_COMMS_DATA], fast_target_buffer_get_u32(buffer, little));
/* Handle first & last using standard embeddedice_write_reg and the middle ones w/the
* core function repeated. */
embeddedice_write_reg(&arm7_9->eice_cache->reg_list[EICE_COMMS_DATA], fast_target_buffer_get_u32(buffer, little));
embeddedice_reg_t *ice_reg = arm7_9->eice_cache->reg_list[EICE_COMMS_DATA].arch_info;
uint8_t reg_addr = ice_reg->addr & 0x1f;
embeddedice_reg_t *ice_reg = arm7_9->eice_cache->reg_list[EICE_COMMS_DATA].arch_info;
uint8_t reg_addr = ice_reg->addr & 0x1f;
int section;
for (section=0; section < image->num_sections; section++)
{
int section;
for (section=0; section < image->num_sections; section++)
{
- image->sections[section].base_address+=image->base_address;
+ image->sections[section].base_address += image->base_address;
}
/* we're done relocating. The two statements below are mainly
* for documenation purposes: stop anyone from empirically
}
/* we're done relocating. The two statements below are mainly
* for documenation purposes: stop anyone from empirically
MIPS32_SW(8,0,11), /* sw $8,0($11) */
MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */
MIPS32_SW(8,0,11), /* sw $8,0($11) */
MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */
- MIPS32_ADDI(9,9,4), /* $1+=4 */
- MIPS32_ADDI(11,11,4), /* $11+=4 */
+ MIPS32_ADDI(9,9,4), /* $1 += 4 */
+ MIPS32_ADDI(11,11,4), /* $11 += 4 */
MIPS32_NOP,
MIPS32_B(NEG16(9)), /* b loop */
MIPS32_NOP,
MIPS32_B(NEG16(9)), /* b loop */
MIPS32_SW(8,0,11), /* sw $8,0($11) */
MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */
MIPS32_SW(8,0,11), /* sw $8,0($11) */
MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */
- MIPS32_ADDI(9,9,2), /* $9+=2 */
- MIPS32_ADDI(11,11,4), /* $11+=4 */
+ MIPS32_ADDI(9,9,2), /* $9 += 2 */
+ MIPS32_ADDI(11,11,4), /* $11 += 4 */
MIPS32_NOP,
MIPS32_B(NEG16(9)), /* b loop */
MIPS32_NOP,
MIPS32_NOP,
MIPS32_B(NEG16(9)), /* b loop */
MIPS32_NOP,
MIPS32_SW(8,0,11), /* sw $8,0($11) */
MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */
MIPS32_SW(8,0,11), /* sw $8,0($11) */
MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */
- MIPS32_ADDI(9,9,1), /* $9+=1 */
- MIPS32_ADDI(11,11,4), /* $11+=4 */
+ MIPS32_ADDI(9,9,1), /* $9 += 1 */
+ MIPS32_ADDI(11,11,4), /* $11 += 4 */
MIPS32_NOP,
MIPS32_B(NEG16(9)), /* b loop */
MIPS32_NOP,
MIPS32_NOP,
MIPS32_B(NEG16(9)), /* b loop */
MIPS32_NOP,
MIPS32_ADDI(8,15,NEG16(MIPS32_PRACC_STACK-MIPS32_PRACC_PARAM_IN)), //$8= MIPS32_PRACC_PARAM_IN
MIPS32_LW(9,0,8), /* Load write addr to $9 */
MIPS32_LW(10,4,8), //last address /* Load write count to $10 */
MIPS32_ADDI(8,15,NEG16(MIPS32_PRACC_STACK-MIPS32_PRACC_PARAM_IN)), //$8= MIPS32_PRACC_PARAM_IN
MIPS32_LW(9,0,8), /* Load write addr to $9 */
MIPS32_LW(10,4,8), //last address /* Load write count to $10 */
- MIPS32_ADDI(8,8,8), // $8+=8 beginning of data
+ MIPS32_ADDI(8,8,8), // $8 += 8 beginning of data
//loop:
MIPS32_LW(11,0,8), /* lw $11,0($8), Load $11 with the word @mem[$8] */
MIPS32_SW(11,0,9), /* sw $11,0($9) */
//loop:
MIPS32_LW(11,0,8), /* lw $11,0($8), Load $11 with the word @mem[$8] */
MIPS32_SW(11,0,9), /* sw $11,0($9) */
- MIPS32_ADDI(9,9,4), /* $9+=4 */
+ MIPS32_ADDI(9,9,4), /* $9 += 4 */
MIPS32_BNE(10,9,NEG16(4)), //was 9 BNE $10, 9, loop /* b loop */
MIPS32_BNE(10,9,NEG16(4)), //was 9 BNE $10, 9, loop /* b loop */
- MIPS32_ADDI(8,8,4), //this instruction is part of the loop (one delay slot)! /* $8+=4 */
+ MIPS32_ADDI(8,8,4), //this instruction is part of the loop (one delay slot)! /* $8 += 4 */
/* end: */
MIPS32_LW(11,0,15), /* lw $11,($15) */
MIPS32_LW(10,0,15), /* lw $10,($15) */
/* end: */
MIPS32_LW(11,0,15), /* lw $11,($15) */
MIPS32_LW(10,0,15), /* lw $10,($15) */
MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)),
MIPS32_LW(9,0,8), /* Load write addr to $9 */
MIPS32_LW(10,4,8), /* Load write count to $10 */
MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)),
MIPS32_LW(9,0,8), /* Load write addr to $9 */
MIPS32_LW(10,4,8), /* Load write count to $10 */
- MIPS32_ADDI(8,8,8), /* $8+=8 */
+ MIPS32_ADDI(8,8,8), /* $8 += 8 */
MIPS32_NOP,
/* loop: */
MIPS32_BEQ(0,10,9), /* beq $0, $10, end */
MIPS32_NOP,
/* loop: */
MIPS32_BEQ(0,10,9), /* beq $0, $10, end */
MIPS32_SH(11,0,9), /* sh $11,0($9) */
MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */
MIPS32_SH(11,0,9), /* sh $11,0($9) */
MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */
- MIPS32_ADDI(9,9,2), /* $9+=2 */
- MIPS32_ADDI(8,8,4), /* $8+=4 */
+ MIPS32_ADDI(9,9,2), /* $9 += 2 */
+ MIPS32_ADDI(8,8,4), /* $8 += 4 */
MIPS32_NOP,
MIPS32_B(NEG16(9)), /* b loop */
MIPS32_NOP,
MIPS32_B(NEG16(9)), /* b loop */
MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)),
MIPS32_LW(9,0,8), /* Load write addr to $9 */
MIPS32_LW(10,4,8), /* Load write count to $10 */
MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)),
MIPS32_LW(9,0,8), /* Load write addr to $9 */
MIPS32_LW(10,4,8), /* Load write count to $10 */
- MIPS32_ADDI(8,8,8), /* $8+=8 */
+ MIPS32_ADDI(8,8,8), /* $8 += 8 */
MIPS32_NOP,
/* loop: */
MIPS32_BEQ(0,10,9), /* beq $0, $10, end */
MIPS32_NOP,
/* loop: */
MIPS32_BEQ(0,10,9), /* beq $0, $10, end */
MIPS32_SB(11,0,9), /* sb $11,0($9) */
MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */
MIPS32_SB(11,0,9), /* sb $11,0($9) */
MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */
- MIPS32_ADDI(9,9,1), /* $9+=1 */
- MIPS32_ADDI(8,8,4), /* $8+=4 */
+ MIPS32_ADDI(9,9,1), /* $9 += 1 */
+ MIPS32_ADDI(8,8,4), /* $8 += 4 */
MIPS32_NOP,
MIPS32_B(NEG16(9)), /* b loop */
MIPS32_NOP,
MIPS32_B(NEG16(9)), /* b loop */
if (image.sections[i].base_address<min_address)
{
/* clip addresses below */
if (image.sections[i].base_address<min_address)
{
/* clip addresses below */
- offset+=min_address-image.sections[i].base_address;
+ offset += min_address-image.sections[i].base_address;
if (image.sections[i].base_address<min_address)
{
/* clip addresses below */
if (image.sections[i].base_address<min_address)
{
/* clip addresses below */
- offset+=min_address-image.sections[i].base_address;
+ offset += min_address-image.sections[i].base_address;
{
retval = target_write_buffer(target, fastload[i].address, fastload[i].length, fastload[i].data);
}
{
retval = target_write_buffer(target, fastload[i].address, fastload[i].length, fastload[i].data);
}
- size+=fastload[i].length;
+ size += fastload[i].length;
}
int after=timeval_ms();
command_print(cmd_ctx, "Loaded image %f kBytes/s", (float)(size/1024.0)/((float)(after-ms)/1000.0));
}
int after=timeval_ms();
command_print(cmd_ctx, "Loaded image %f kBytes/s", (float)(size/1024.0)/((float)(after-ms)/1000.0));