Commit d61714f4 authored by zwelch's avatar zwelch
Browse files

- Fixes '[+]=' whitespace

- 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
parent 53d605e1
......@@ -1014,7 +1014,7 @@ static void cfi_fix_code_endian(target_t *target, uint8_t *dest, const uint32_t
for (i=0; i< count; i++)
{
target_buffer_set_u32(target, dest, *src);
dest+=4;
dest += 4;
src++;
}
}
......
......@@ -319,7 +319,7 @@ static int eCosBoard_flash(ecosflash_flash_bank_t *info, void *data, uint32_t ad
uint32_t i;
for (i=0; i<len; i+=chunk)
for (i=0; i<len; i += chunk)
{
int t=len-i;
if (t>chunk)
......
......@@ -278,7 +278,7 @@ static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time)
duration_stop_measure(&duration, NULL);
t=duration.duration.tv_usec/1000;
t+=duration.duration.tv_sec*1000;
t += duration.duration.tv_sec*1000;
if (t > time)
break;
......
......@@ -64,7 +64,7 @@ void cmd_flash(uint32 cmd)
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;
}
......
......@@ -146,7 +146,7 @@ int flash_erase_plane(int efc_ofs)
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;
lockbits>>=1;
}
......
......@@ -429,7 +429,7 @@ void alive_sleep(int ms)
{
int i;
int napTime=10;
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)
......
......@@ -100,7 +100,7 @@ int duration_stop_measure(duration_t *duration, char **text)
{
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);
}
......@@ -114,8 +114,8 @@ long long timeval_ms()
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;
return t;
}
......@@ -1274,7 +1274,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
/* 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;
......@@ -1333,7 +1333,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
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)
{
long bits;
int len;
......@@ -1361,7 +1361,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
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)
{
long bits;
char *str;
......
......@@ -455,7 +455,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_
value=0;
if (fields[i].out_value != NULL)
{
for (l=0; l<k; l+=8)
for (l=0; l<k; l += 8)
{
value|=fields[i].out_value[(j+l)/8]<<l;
}
......@@ -472,12 +472,12 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_
// we're shifting in data to MSB, shift data to be aligned for returning the value
value >>= 32-k;
for (l=0; l<k; l+=8)
for (l=0; l<k; l += 8)
{
inBuffer[(j+l)/8]=(value>>l)&0xff;
}
}
j+=k;
j += k;
}
}
}
......@@ -634,7 +634,7 @@ static int zy1000_jtag_add_clocks(int num_cycles, tap_state_t state, tap_state_t
/* 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)
{
int num;
num=32;
......@@ -742,7 +742,7 @@ void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int l
{
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, fast_target_buffer_get_u32(buffer, 1));
shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1<<5));
buffer+=4;
buffer += 4;
}
} else
{
......@@ -751,7 +751,7 @@ void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int l
{
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, fast_target_buffer_get_u32(buffer, 0));
shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1<<5));
buffer+=4;
buffer += 4;
}
}
}
......
......@@ -923,7 +923,7 @@ void gdb_target_to_reg(target_t *target, char *tstr, int str_len, uint8_t *bin)
}
int i;
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]);
......
......@@ -2587,7 +2587,7 @@ static int arm7_9_dcc_completion(struct target_s *target, uint32_t exit_point, i
/* 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));
buffer+=4;
buffer += 4;
embeddedice_reg_t *ice_reg = arm7_9->eice_cache->reg_list[EICE_COMMS_DATA].arch_info;
uint8_t reg_addr = ice_reg->addr & 0x1f;
......
......@@ -764,7 +764,7 @@ int image_open(image_t *image, char *url, char *type_string)
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
......
......@@ -314,8 +314,8 @@ int mips32_pracc_read_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
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 */
......@@ -422,8 +422,8 @@ int mips32_pracc_read_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
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,
......@@ -501,8 +501,8 @@ int mips32_pracc_read_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, u
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,
......@@ -588,15 +588,15 @@ int mips32_pracc_write_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
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) */
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_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) */
......@@ -669,7 +669,7 @@ int mips32_pracc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
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 */
......@@ -679,8 +679,8 @@ int mips32_pracc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
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 */
......@@ -729,7 +729,7 @@ int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
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 */
......@@ -739,8 +739,8 @@ int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
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 */
......
......@@ -2285,7 +2285,7 @@ static int handle_load_image_command(struct command_context_s *cmd_ctx, char *cm
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;
length -= offset;
}
......@@ -4466,7 +4466,7 @@ static int handle_fast_load_image_command(struct command_context_s *cmd_ctx, cha
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;
length -= offset;
}
......@@ -4535,7 +4535,7 @@ static int handle_fast_load_command(struct command_context_s *cmd_ctx, char *cmd
{
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));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment